]> git.vpit.fr Git - perl/modules/Sub-Prototype-Util.git/commitdiff
Document that flatten() croaks
authorVincent Pit <vince@profvince.com>
Thu, 4 Jun 2009 22:25:09 +0000 (00:25 +0200)
committerVincent Pit <vince@profvince.com>
Thu, 4 Jun 2009 22:25:09 +0000 (00:25 +0200)
lib/Sub/Prototype/Util.pm

index df3e45635b3331189460ee8a5f5d31bfb80c4487..4778662ff35c872af76231b23090d5d9cb3f6257 100644 (file)
@@ -70,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<flatten> returns the list of what C<@_> would have been if there were no prototype.
 
 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<flatten> 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
 
 
 =cut