X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FFunction%2FParameters.pm;h=c87f78eecd2f2d0ab62b9409554eb61ec89ec571;hb=929a23c5b4a988198111135a0922625ab77e5cd9;hp=bce63adca49f7023271a60ac34abfcd0e5e552d7;hpb=d45c903707440a36cf675b20f5469dbed18d0b01;p=p5sagit%2FFunction-Parameters.git diff --git a/lib/Function/Parameters.pm b/lib/Function/Parameters.pm index bce63ad..c87f78e 100644 --- a/lib/Function/Parameters.pm +++ b/lib/Function/Parameters.pm @@ -9,7 +9,7 @@ use Carp qw(confess); use XSLoader; BEGIN { - our $VERSION = '0.06_01'; + our $VERSION = '0.09'; XSLoader::load; } @@ -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)) { ...