$msg;
}
-=head2 C<flatten $proto, @args>
+=head2 C<flatten>
+
+ my @flattened = flatten($proto, @args);
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.
return @args;
}
-=head2 C<wrap $name, %opts>
+=head2 C<wrap>
+
+ my $wrapper = wrap($name, %opts);
+ my $wrapper = wrap({ $name => $proto }, %opts);
Generates a wrapper that calls the function C<$name> with a prototyped argument list.
That is, the wrapper's arguments should be what C<@_> is when you define a subroutine with the same prototype as C<$name>.
return $call;
}
-=head2 C<recall $name, @args>
+=head2 C<recall>
+
+ my @res = recall($name, @args);
+ my @res = recall({ $name => $proto }, @args);
Calls the function C<$name> with the prototyped argument list C<@args>.
That is, C<@args> should be what C<@_> is when you call a subroutine with C<$name> as prototype.