Updated mic
[catagits/Catalyst-Runtime.git] / lib / Catalyst / DispatchType / Path.pm
index ccff553..1672712 100644 (file)
@@ -16,9 +16,7 @@ See L<Catalyst>.
 
 =head1 METHODS
 
-=over 4
-
-=item $self->list($c)
+=head2 $self->list($c)
 
 =cut
 
@@ -33,7 +31,7 @@ sub list {
       if ( keys %{ $self->{paths} } );
 }
 
-=item $self->match( $c, $path )
+=head2 $self->match( $c, $path )
 
 =cut
 
@@ -51,7 +49,7 @@ sub match {
     return 0;
 }
 
-=item $self->register( $c, $action )
+=head2 $self->register( $c, $action )
 
 =cut
 
@@ -64,6 +62,7 @@ sub register {
     foreach my $r ( @{ $attrs->{Path} || [] } ) {
         unless ($r) {
             $r = $action->namespace;
+            $r = '' if $r eq '/';
         }
         elsif ( $r !~ m!^/! ) {    # It's a relative path
             $r = $action->namespace . "/$r";
@@ -86,7 +85,7 @@ sub register {
     return 0;
 }
 
-=item $self->register_path($c, $path, $action)
+=head2 $self->register_path($c, $path, $action)
 
 =cut
 
@@ -96,8 +95,6 @@ sub register_path {
     $self->{paths}{$path} = $action;
 }
 
-=back
-
 =head1 AUTHOR
 
 Matt S Trout