From: Vincent Pit Date: Fri, 23 Aug 2013 19:29:10 +0000 (-0300) Subject: Make sure the POD headings are linkable X-Git-Tag: v0.11~6 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FSub-Prototype-Util.git;a=commitdiff_plain;h=e0d0c3b61349870e1009e833116c10a794e3b6b8 Make sure the POD headings are linkable --- diff --git a/lib/Sub/Prototype/Util.pm b/lib/Sub/Prototype/Util.pm index 1bace59..a981d27 100644 --- a/lib/Sub/Prototype/Util.pm +++ b/lib/Sub/Prototype/Util.pm @@ -72,7 +72,9 @@ sub _clean_msg { $msg; } -=head2 C +=head2 C + + 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 returns the list of what C<@_> would have been if there were no prototype. @@ -118,7 +120,10 @@ sub flatten { return @args; } -=head2 C +=head2 C + + 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>. @@ -279,7 +284,10 @@ sub wrap { return $call; } -=head2 C +=head2 C + + 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.