From: Lukas Mai Date: Sun, 24 Jun 2012 12:39:09 +0000 (+0200) Subject: reformat prototypes in sample code X-Git-Tag: v0.07~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d71d548b8d080a6f44ef236dc1b17ddca1c12c6a;p=p5sagit%2FFunction-Parameters.git reformat prototypes in sample code --- diff --git a/lib/Function/Parameters.pm b/lib/Function/Parameters.pm index bce63ad..f915bc8 100644 --- a/lib/Function/Parameters.pm +++ b/lib/Function/Parameters.pm @@ -160,7 +160,9 @@ Function::Parameters - subroutine definitions with parameter lists } # function with prototype - fun mymap($fun, @args) :(&@) { + fun mymap($fun, @args) + :(&@) + { my @res; for (@args) { push @res, $fun->($_); @@ -441,7 +443,11 @@ As an example, the following declaration uses every available feature (subroutine name, parameter list, default arguments, prototype, default attributes, attributes, argument count checks, and implicit C<$self>): - method foo($x, $y, $z = sqrt 5) :($$$;$) :lvalue :Banana(2 + 2) { + method foo($x, $y, $z = sqrt 5) + :($$$;$) + :lvalue + :Banana(2 + 2) + { ... } @@ -459,7 +465,8 @@ And here's what it turns into: Another example: - my $coderef = fun ($p, $q) :(;$$) + my $coderef = fun ($p, $q) + :(;$$) :lvalue :Gazebo((>:O)) { ...