From: Vincent Pit Date: Sat, 10 Mar 2012 10:25:28 +0000 (+0100) Subject: Propagate compilation errors for autogenerated accessors X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=8e068f0fd1bd7238d627a66c86b1b8335b975e71;p=perl%2Fscripts%2Fxchat.git Propagate compilation errors for autogenerated accessors --- diff --git a/Xchat/XPI.pm b/Xchat/XPI.pm index f06e159..6927d83 100644 --- a/Xchat/XPI.pm +++ b/Xchat/XPI.pm @@ -61,7 +61,8 @@ sub new { } BEGIN { - eval "sub $_ { my \$ph = \$_[0]; *\$ph->{$_} }" for @attributes; + local $@; + eval "sub $_ { my \$ph = \$_[0]; *\$ph->{$_} }; 1" or die $@ for @attributes; } sub print {