X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FSub-Prototype-Util.git;a=blobdiff_plain;f=lib%2FSub%2FPrototype%2FUtil.pm;h=702d07f2b57c1f14d9b777473cb2eb0bea39399f;hp=d0026f36180bde09f8d3984e682cdd5452a9b0d6;hb=02e1fd83ee0c567a890875e50b1d00f5e097a2a2;hpb=4b6633220cf3e141450467e3578d931997776ac7 diff --git a/lib/Sub/Prototype/Util.pm b/lib/Sub/Prototype/Util.pm index d0026f3..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) { @@ -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{$_} ."') { "