X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FSub%2FPrototype%2FUtil.pm;h=702d07f2b57c1f14d9b777473cb2eb0bea39399f;hb=02e1fd83ee0c567a890875e50b1d00f5e097a2a2;hp=4297c264fc72de4e28b7aeec23189e6743d2963c;hpb=ca9ceb4f24802eebce590c2adcb09f8e170146c9;p=perl%2Fmodules%2FSub-Prototype-Util.git diff --git a/lib/Sub/Prototype/Util.pm b/lib/Sub/Prototype/Util.pm index 4297c26..702d07f 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