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=9137b14305de711ad0ef02536917e81362f42e9b;hb=26e43a265dbd585d36cc6b3fc48c423e17421a62;hpb=ad704ef3731466202f6eb128763d6ed0919aaaf1 diff --git a/lib/Sub/Prototype/Util.pm b/lib/Sub/Prototype/Util.pm index 9137b14..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) { @@ -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