X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FSub-Prototype-Util.git;a=blobdiff_plain;f=lib%2FSub%2FPrototype%2FUtil.pm;h=d52b905f8c8370fad0e2b7f218952da99b52e30f;hp=4297c264fc72de4e28b7aeec23189e6743d2963c;hb=26e43a265dbd585d36cc6b3fc48c423e17421a62;hpb=ca9ceb4f24802eebce590c2adcb09f8e170146c9 diff --git a/lib/Sub/Prototype/Util.pm b/lib/Sub/Prototype/Util.pm index 4297c26..d52b905 100644 --- a/lib/Sub/Prototype/Util.pm +++ b/lib/Sub/Prototype/Util.pm @@ -77,7 +77,7 @@ It croaks if the arguments can't possibly match the required prototype, e.g. whe sub flatten { my $proto = shift; return @_ unless defined $proto; - my @args; + my @args; while ($proto =~ /(\\?)(\[[^\]]+\]|[^\];])/g) { my $p = $2; if ($1) { @@ -129,7 +129,7 @@ Valid keys are : Specifies the function used in the generated code to test the reference type of scalars. Defaults to C<'ref'>. -You may also want to use C. +You may also want to use L. =item C<< wrong_ref => $code >> @@ -165,7 +165,7 @@ sub _wrap { my $cur = '$_[' . $i . ']'; if ($ref) { if (length $p > 1) { - return 'my $r = ' . $opts->{ref} . '(' . $cur . '); ' + return 'my $r = ' . $opts->{ref} . '(' . $cur . '); ' . join ' els', map( { "if (\$r eq '" . $reftypes{$_} ."') { " @@ -310,7 +310,7 @@ Tests code coverage report is available at L