summaryrefslogtreecommitdiffstats
path: root/perl_checker.src/test/return_value.t
diff options
context:
space:
mode:
Diffstat (limited to 'perl_checker.src/test/return_value.t')
-rw-r--r--perl_checker.src/test/return_value.t16
1 files changed, 16 insertions, 0 deletions
diff --git a/perl_checker.src/test/return_value.t b/perl_checker.src/test/return_value.t
new file mode 100644
index 0000000..e826c08
--- /dev/null
+++ b/perl_checker.src/test/return_value.t
@@ -0,0 +1,16 @@
+if ($xxx or $yyy) {} value should be dropped
+ context () is not compatible with context scalar
+
+if ($xxx and $yyy) {} value should be dropped
+ context () is not compatible with context scalar
+
+$xxx && yyy(); value is dropped
+
+`xxx`; value is dropped
+
+/(.*)/; value is dropped
+
+map { xxx($_) } @l; if you don't use the return value, use "foreach" instead of "map"
+
+$xxx = chomp; () context not accepted here
+ context () is not compatible with context scalar