No need to remove non-word chars from sub names
Dave Rolsky [Sun, 23 Jan 2011 21:07:19 +0000 (15:07 -0600)]
lib/CatalystX/Routes.pm

index bd9a131..63f0d82 100644 (file)
@@ -50,8 +50,8 @@ sub _add_route {
 
     # We need to turn the full chain name into a path, since two end points
     # from two different chains could have the same end point name.
-    ( my $name = ( $attrs->{Chained} eq '/' ? q{} : $attrs->{Chained} ) . q{/}
-            . $_[0] ) =~ s/(\W)/'X' . sprintf( '%x', ord($1) )/eg;
+    my $name = ( $attrs->{Chained} eq '/' ? q{} : $attrs->{Chained} ) . q{/}
+        . $_[0];
 
     my $meth_base = '__route__' . $name;
 
@@ -74,7 +74,7 @@ sub _add_chain_point {
     my $meta = shift;
     my ( $attrs, $sub ) = _process_args( $meta, @_ );
 
-    ( my $name = $_[0] ) =~ s/(\W)/'X' . sprintf('%x', ord(1) )/eg;
+    my $name = $_[0];
 
     $meta->add_chain_point( $name => [ $attrs, $sub ] );
 }