summaryrefslogtreecommitdiffstats
path: root/src/test/context.t
diff options
context:
space:
mode:
authorMageia SVN-Git Migration <svn-git-migration@mageia.org>2007-04-25 15:16:21 +0000
committerMageia SVN-Git Migration <svn-git-migration@mageia.org>2007-04-25 15:16:21 +0000
commitbe4fff49f0164e606d4b2f76f64d4d108895f236 (patch)
treea46bc8c23de0b885f8a2962a9069930b48836fd9 /src/test/context.t
parent4746e8e79a5b3cdf3f72400a5a5d6742f6a76a8c (diff)
downloadperl_checker-be4fff49f0164e606d4b2f76f64d4d108895f236.tar
perl_checker-be4fff49f0164e606d4b2f76f64d4d108895f236.tar.gz
perl_checker-be4fff49f0164e606d4b2f76f64d4d108895f236.tar.bz2
perl_checker-be4fff49f0164e606d4b2f76f64d4d108895f236.tar.xz
perl_checker-be4fff49f0164e606d4b2f76f64d4d108895f236.zip
Rename folder to match history.
This is a Synthesized commit to combine perl-MDK-Common and perl_checker repository history.
Diffstat (limited to 'src/test/context.t')
-rw-r--r--src/test/context.t41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/test/context.t b/src/test/context.t
new file mode 100644
index 0000000..081abcc
--- /dev/null
+++ b/src/test/context.t
@@ -0,0 +1,41 @@
+foreach (%h) {} context hash is not compatible with context list
+ foreach with a hash is usually an error
+
+map { 'xxx' } %h a hash is not a valid parameter to function map
+
+$xxx = ('yyy', 'zzz') context tuple(string, string) is not compatible with context scalar
+
+@l ||= 'xxx' "||=" is only useful with a scalar
+
+length @l never use "length @l", it returns the length of the string int(@l)
+
+%h . 'yyy' context hash is not compatible with context string
+
+'xxx' > 'yyy' context string is not compatible with context float
+ context string is not compatible with context float
+
+
+1 cmp 2 you should use a number operator, not the string operator "cmp" (or replace the number with a string)
+
+$xxx == undef context undef is not compatible with context float
+
+my ($xxx) = 1 context int is not compatible with context tuple(scalar)
+
+($xxx, $yyy) = 1 context int is not compatible with context tuple(scalar, scalar)
+
+($xxx, $yyy) = (1, 2, 3) context tuple(int, int, int) is not compatible with context tuple(scalar, scalar)
+
+@l eq '3' context array is not compatible with context string
+
+qw(a b) > 2 context tuple(string, string) is not compatible with context float
+
+%h > 0 context hash is not compatible with context float
+
+%h eq 0 context hash is not compatible with context string
+ you should use a number operator, not the string operator "eq" (or replace the number with a string)
+
+@l == ()
+
+$xxx = { xxx() }->{xxx};
+
+$xxx = { xxx() }->{$xxx};