From: Fuji, Goro Date: Sat, 25 Sep 2010 04:20:09 +0000 (+0900) Subject: Fix invalid interpolations in pure perl accessors X-Git-Tag: 0.72~28 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f4118476b7be65b614120c91c5fc115a9de7796a;p=gitmo%2FMouse.git Fix invalid interpolations in pure perl accessors --- diff --git a/lib/Mouse/Meta/Method/Accessor.pm b/lib/Mouse/Meta/Method/Accessor.pm index eea250c..fc97c6d 100644 --- a/lib/Mouse/Meta/Method/Accessor.pm +++ b/lib/Mouse/Meta/Method/Accessor.pm @@ -33,7 +33,7 @@ sub _generate_accessor_any{ } else{ # writer $accessor .= - 'if(@_ < 2){ Carp::confess("Not enough arguments for the writer of '.$name.'") }'. + 'if(@_ < 2){ Carp::confess("Not enough arguments for the writer of $name") }'. '{' . "\n"; } @@ -69,7 +69,7 @@ sub _generate_accessor_any{ $accessor .= "}\n"; } elsif($type eq 'ro') { - $accessor .= 'Carp::confess("Cannot assign a value to a read-only accessor") if scalar(@_) >= 2;' . "\n"; + $accessor .= 'Carp::confess("Cannot assign a value to a read-only accessor of $name") if scalar(@_) >= 2;' . "\n"; } else{ $class->throw_error("Unknown accessor type '$type'");