[Bps-public-commit] Path-Dispatcher branch, master, updated. cd15abb1a574e312685861d1b2a5f5180f62dd03
sartak at bestpractical.com
sartak at bestpractical.com
Sun Aug 9 13:25:56 EDT 2009
The branch, master has been updated
via cd15abb1a574e312685861d1b2a5f5180f62dd03 (commit)
from 7f8763f152cb27937f2e572877d261963f562279 (commit)
Summary of changes:
lib/Path/Dispatcher/Role/Rules.pm | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
- Log -----------------------------------------------------------------
commit cd15abb1a574e312685861d1b2a5f5180f62dd03
Author: Shawn M Moore <sartak at gmail.com>
Date: Sun Aug 9 13:25:47 2009 -0400
Add unshift_rule method
diff --git a/lib/Path/Dispatcher/Role/Rules.pm b/lib/Path/Dispatcher/Role/Rules.pm
index 8e6ba1b..f05d3e6 100644
--- a/lib/Path/Dispatcher/Role/Rules.pm
+++ b/lib/Path/Dispatcher/Role/Rules.pm
@@ -18,6 +18,16 @@ sub add_rule {
push @{ $self->{_rules} }, @_;
}
+sub unshift_rule {
+ my $self = shift;
+
+ $_->isa('Path::Dispatcher::Rule')
+ or confess "$_ is not a Path::Dispatcher::Rule"
+ for @_;
+
+ unshift @{ $self->{_rules} }, @_;
+}
+
sub rules { @{ shift->{_rules} } }
no Any::Moose;
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list