[Bps-public-commit] Path-Dispatcher branch, named_captures, updated. d132aef2f6f53cad52cf42baed5a9aab54acbbb7
Shawn Moore
sartak at bestpractical.com
Tue Jul 6 14:44:05 EDT 2010
The branch, named_captures has been updated
via d132aef2f6f53cad52cf42baed5a9aab54acbbb7 (commit)
from 30732149c791602827b1bc0c7fce863e72bb2cbc (commit)
Summary of changes:
lib/Path/Dispatcher/Match.pm | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit d132aef2f6f53cad52cf42baed5a9aab54acbbb7
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Tue Jul 6 14:41:58 2010 -0400
Factor out positional_captures
diff --git a/lib/Path/Dispatcher/Match.pm b/lib/Path/Dispatcher/Match.pm
index cfb0fd5..39d4cd9 100644
--- a/lib/Path/Dispatcher/Match.pm
+++ b/lib/Path/Dispatcher/Match.pm
@@ -59,9 +59,10 @@ sub _run_with_capture_vars {
# populate %+
*+ = $self->named_captures;
+ my @positional = @{ $self->positional_captures };
my $assignments = join "\n",
- map { "local *$_ = \\(\$self->positional_captures->[$_-1]);" }
- 1 .. @{ $self->positional_captures };
+ map { "local *$_ = \\(\$positional[$_-1]);" }
+ 1 .. @positional;
eval "
$assignments;
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list