From: Matt S Trout Date: Thu, 10 Nov 2005 02:00:21 +0000 (+0000) Subject: - Tweaked attr parsing (thanks LTJake - now gimme some tests :) X-Git-Tag: 5.7099_04~975 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=9c0c383b6f1d8eb25f32313f18d434082018f0b6 - Tweaked attr parsing (thanks LTJake - now gimme some tests :) --- diff --git a/lib/Catalyst/Base.pm b/lib/Catalyst/Base.pm index 35787a4..6292fd3 100644 --- a/lib/Catalyst/Base.pm +++ b/lib/Catalyst/Base.pm @@ -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/ );