- Tweaked attr parsing (thanks LTJake - now gimme some tests :)
Matt S Trout [Thu, 10 Nov 2005 02:00:21 +0000 (02:00 +0000)]
lib/Catalyst/Base.pm

index 35787a4..6292fd3 100644 (file)
@@ -114,7 +114,7 @@ sub _parse_attrs {
 
         # Parse out :Foo(bar) into Foo => bar etc (and arrayify)
 
-        if ( my ( $key, $value ) = ( $attr =~ /^(.*?)(?:\(\s*(.+)\s*\))?$/ ) ) {
+        if ( my ( $key, $value ) = ( $attr =~ /^(.*?)(?:\(\s*(.+?)\s*\))?$/ ) ) {
 
             if ( defined $value ) {
                 ( $value =~ s/^'(.*)'$/$1/ ) || ( $value =~ s/^"(.*)"/$1/ );