[Bps-public-commit] Path-Dispatcher branch, complete, updated. 61d055f4b1ca9f6d32bc1ce90592d641b2ef30f7
sartak at bestpractical.com
sartak at bestpractical.com
Fri Dec 18 18:55:15 EST 2009
The branch, complete has been updated
via 61d055f4b1ca9f6d32bc1ce90592d641b2ef30f7 (commit)
from 7f325bba3846f379138a66b0efdab83aef21082a (commit)
Summary of changes:
lib/Path/Dispatcher/Cookbook.pod | 6 +++---
lib/Path/Dispatcher/Declarative.pm | 2 +-
lib/Path/Dispatcher/Match.pm | 2 +-
lib/Path/Dispatcher/Rule/Under.pm | 2 +-
t/020-chain.t | 5 -----
t/100-declarative.t | 2 +-
6 files changed, 7 insertions(+), 12 deletions(-)
- Log -----------------------------------------------------------------
commit 61d055f4b1ca9f6d32bc1ce90592d641b2ef30f7
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Fri Dec 18 18:55:09 2009 -0500
Kill EOL whitespace
diff --git a/lib/Path/Dispatcher/Cookbook.pod b/lib/Path/Dispatcher/Cookbook.pod
index d26db50..60982d0 100644
--- a/lib/Path/Dispatcher/Cookbook.pod
+++ b/lib/Path/Dispatcher/Cookbook.pod
@@ -21,10 +21,10 @@ C<token_delimiter> method:
package Web::Dispatcher;
use base 'Path::Dispatcher::Declarative';
-
+
use constant token_delimiter => '/';
-
-
+
+
package My::Other::Dispatcher;
use Web::Dispatcher -base;
diff --git a/lib/Path/Dispatcher/Declarative.pm b/lib/Path/Dispatcher/Declarative.pm
index eda3f31..a000ef8 100644
--- a/lib/Path/Dispatcher/Declarative.pm
+++ b/lib/Path/Dispatcher/Declarative.pm
@@ -100,7 +100,7 @@ Path::Dispatcher::Declarative - sugary dispatcher
use Path::Dispatcher::Declarative -base;
on score => sub { show_score() };
-
+
on ['wield', qr/^\w+$/] => sub { wield_weapon($2) };
rewrite qr/^inv/ => "display inventory";
diff --git a/lib/Path/Dispatcher/Match.pm b/lib/Path/Dispatcher/Match.pm
index 5ba67b9..3552d64 100644
--- a/lib/Path/Dispatcher/Match.pm
+++ b/lib/Path/Dispatcher/Match.pm
@@ -59,7 +59,7 @@ sub run_with_number_vars {
my $str = join '', map { defined($_) ? $_ : "" } @_;
# we need to check length because Perl's annoying gotcha of the empty regex
- # actually being an alias for whatever the previously used regex was
+ # actually being an alias for whatever the previously used regex was
# (useful last decade when qr// hadn't been invented)
# we need to do the match anyway, because we have to clear the number vars
($str, $re) = ("x", "x") if length($str) == 0;
diff --git a/lib/Path/Dispatcher/Rule/Under.pm b/lib/Path/Dispatcher/Rule/Under.pm
index a7dcd4e..ce2996e 100644
--- a/lib/Path/Dispatcher/Rule/Under.pm
+++ b/lib/Path/Dispatcher/Rule/Under.pm
@@ -33,7 +33,7 @@ sub match {
# an ::Always (one that will always trigger next_rule if it's block is ran)
#
return unless my @matches = grep { defined } map { $_->match($new_path) } $self->rules;
- pop @matches while @matches && $matches[-1]->rule->isa('Path::Dispatcher::Rule::Chain');
+ pop @matches while @matches && $matches[-1]->rule->isa('Path::Dispatcher::Rule::Chain');
return @matches;
}
diff --git a/t/020-chain.t b/t/020-chain.t
index f775401..6cdb7a7 100644
--- a/t/020-chain.t
+++ b/t/020-chain.t
@@ -108,7 +108,6 @@ do {
on 'create' => sub { push @result, "ticket create" };
chain {
push @result, "(ticket chain just for update)";
-
};
on 'update' => sub { push @result, "ticket update" };
};
@@ -116,26 +115,22 @@ do {
under 'blog' => sub {
chain {
push @result, "(blog chain)";
-
};
under 'post' => sub {
chain {
push @result, "(after post)";
-
};
on 'create' => sub { push @result, "create blog post" };
on 'delete' => sub { push @result, "delete blog post" };
};
chain {
push @result, "(before comment)";
-
};
under 'comment' => sub {
on 'create' => sub { push @result, "create blog comment" };
on 'delete' => sub { push @result, "delete blog comment" };
chain {
push @result, "(never included)";
-
};
};
};
diff --git a/t/100-declarative.t b/t/100-declarative.t
index 3c3ada8..f7868a1 100644
--- a/t/100-declarative.t
+++ b/t/100-declarative.t
@@ -26,7 +26,7 @@ do {
under alpha => sub {
then {
- push @calls, "alpha (chain) ";
+ push @calls, "alpha (chain) ";
};
on one => sub {
push @calls, "one";
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list