X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FSub%2FPrototype%2FUtil.pm;h=d88c553c37856dd275f68b18e395fefe443c99fc;hb=861f5f77448b046e9c7180f348200a7fedd08b11;hp=6544afce389d3fc79a90063aaf317b360f6d61c4;hpb=73786f1f0683e45f68b8d0d486c38e447b085fc4;p=perl%2Fmodules%2FSub-Prototype-Util.git diff --git a/lib/Sub/Prototype/Util.pm b/lib/Sub/Prototype/Util.pm index 6544afc..d88c553 100644 --- a/lib/Sub/Prototype/Util.pm +++ b/lib/Sub/Prototype/Util.pm @@ -1,5 +1,7 @@ package Sub::Prototype::Util; +use 5.006; + use strict; use warnings; @@ -68,6 +70,7 @@ sub _clean_msg { Flattens the array C<@args> according to the prototype C<$proto>. When C<@args> is what C<@_> is after calling a subroutine with prototype C<$proto>, C returns the list of what C<@_> would have been if there were no prototype. +It croaks if the arguments can't possibly match the required prototype, e.g. when a reference type is wrong or when not enough elements were provided. =cut @@ -307,7 +310,7 @@ Tests code coverage report is available at L