From: Vincent Pit Date: Thu, 4 Jun 2009 22:25:09 +0000 (+0200) Subject: Document that flatten() croaks X-Git-Tag: v0.09~3 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FSub-Prototype-Util.git;a=commitdiff_plain;h=cf14ceaf1754a03f46cce6e45fe82f1a215d7c0c Document that flatten() croaks --- diff --git a/lib/Sub/Prototype/Util.pm b/lib/Sub/Prototype/Util.pm index df3e456..4778662 100644 --- a/lib/Sub/Prototype/Util.pm +++ b/lib/Sub/Prototype/Util.pm @@ -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 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