summaryrefslogtreecommitdiffstats
path: root/src/test/prototype.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/prototype.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/prototype.t')
-rw-r--r--src/test/prototype.t23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/test/prototype.t b/src/test/prototype.t
new file mode 100644
index 0000000..6e56aae
--- /dev/null
+++ b/src/test/prototype.t
@@ -0,0 +1,23 @@
+
+sub xxx { 'yyy' } if the function doesn't take any parameters, please use the empty prototype.
+ example "sub foo() { ... }"
+
+sub xxx { an non-optional argument must not follow an optional argument
+ my ($o_xxx, $yyy) = @_;
+ ($o_xxx, $yyy);
+}
+
+sub xxx { an array must be the last variable in a prototype
+ my (@xxx, $yyy) = @_;
+ @xxx, $yyy;
+}
+
+bad() unknown function bad
+
+sub f0() {} too many parameters
+f0('yyy')
+
+sub f2 { my ($x, $_y) = @_; $x } not enough parameters
+f2('yyy')
+
+N("xxx %s yyy") not enough parameters