[Bps-public-commit] Path-Dispatcher branch, master, updated. 36b879c2e60c2ba14ae979537b6e25c19f4386cb

Shawn Moore sartak at bestpractical.com
Wed Jun 23 11:47:26 EDT 2010


The branch, master has been updated
       via  36b879c2e60c2ba14ae979537b6e25c19f4386cb (commit)
      from  648981019b0d3ef77f2f456f33438e500afc8643 (commit)

Summary of changes:
 lib/Path/Dispatcher/Match.pm |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

- Log -----------------------------------------------------------------
commit 36b879c2e60c2ba14ae979537b6e25c19f4386cb
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Wed Jun 23 11:34:05 2010 -0400

    Clear $1 etc for the block

diff --git a/lib/Path/Dispatcher/Match.pm b/lib/Path/Dispatcher/Match.pm
index af1e3de..06be61d 100644
--- a/lib/Path/Dispatcher/Match.pm
+++ b/lib/Path/Dispatcher/Match.pm
@@ -52,6 +52,9 @@ sub run_with_number_vars {
     my $self = shift;
     my $code = shift;
 
+    # clear $1, $2, $3 so they don't pollute the number vars for the block
+    "x" =~ /x/;
+
     # populate $1, $2, etc for the duration of $code
     # it'd be nice if we could use "local" but it seems to break tests
     my $i = 0;

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list