X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FSub-Prototype-Util.git;a=blobdiff_plain;f=lib%2FSub%2FPrototype%2FUtil.pm;h=316d079bbe85590ba6c35996ae25afb76bc54db5;hp=20525ece0971b354170d655b1ce89b344100467c;hb=f5bb214c4c842e14fb5e95a77a6888ab1ae81005;hpb=16e8680c6cb85a7196c4a39bb1a5051cbde4e6a0 diff --git a/lib/Sub/Prototype/Util.pm b/lib/Sub/Prototype/Util.pm index 20525ec..316d079 100644 --- a/lib/Sub/Prototype/Util.pm +++ b/lib/Sub/Prototype/Util.pm @@ -93,9 +93,8 @@ sub flatten { } elsif ($p =~ /[\@\%]/) { push @args, @_; last; - } elsif ($p eq '_') { - shift; # without prototype, this argument wouldn't have been passed } else { + croak 'Not enough arguments to match this prototype' unless @_; push @args, shift; } }