[Bps-public-commit] Path-Dispatcher branch, complete, updated. 1c60e67ae7a60506437b3eb6fac82e66723e65fc

sartak at bestpractical.com sartak at bestpractical.com
Fri Dec 18 18:02:55 EST 2009


The branch, complete has been updated
       via  1c60e67ae7a60506437b3eb6fac82e66723e65fc (commit)
      from  b4b9b274486eb400b834aba38d7eaa143e79d0d7 (commit)

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

- Log -----------------------------------------------------------------
commit 1c60e67ae7a60506437b3eb6fac82e66723e65fc
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Fri Dec 18 18:02:48 2009 -0500

    _complete for Eq rules

diff --git a/lib/Path/Dispatcher/Rule/Eq.pm b/lib/Path/Dispatcher/Rule/Eq.pm
index 0a9425e..b0f3b10 100644
--- a/lib/Path/Dispatcher/Rule/Eq.pm
+++ b/lib/Path/Dispatcher/Rule/Eq.pm
@@ -25,6 +25,15 @@ sub _prefix_match {
     return (1, substr($path->path, length($self->string)));
 }
 
+sub _complete {
+    my $self = shift;
+    my $path = shift->path;
+    my $completed = $self->string;
+
+    return unless substr($completed, 0, length($path)) eq $path;
+    return $completed;
+}
+
 sub readable_attributes { q{"} . shift->string . q{"} }
 
 __PACKAGE__->meta->make_immutable;

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



More information about the Bps-public-commit mailing list