From: Lukas Mai Date: Sun, 21 Oct 2012 16:31:19 +0000 (+0200) Subject: fix off-by-one error in documentation example X-Git-Tag: v0.10~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3087bda1054821fba1d07a5741a3f3c0a6ed4752;p=p5sagit%2FFunction-Parameters.git fix off-by-one error in documentation example --- diff --git a/lib/Function/Parameters.pm b/lib/Function/Parameters.pm index c87f78e..36e686c 100644 --- a/lib/Function/Parameters.pm +++ b/lib/Function/Parameters.pm @@ -455,7 +455,7 @@ And here's what it turns into: sub foo ($$$;$) :method :lvalue :Banana(2 + 2) { sub foo ($$$;$); - Carp::croak "Not enough arguments for method foo" if @_ < 2; + Carp::croak "Not enough arguments for method foo" if @_ < 3; Carp::croak "Too many arguments for method foo" if @_ > 4; my $self = shift; my ($x, $y, $z) = @_;