]> git.vpit.fr Git - perl/scripts/xchat.git/blobdiff - Xchat/XPI.pm
Propagate compilation errors for autogenerated accessors
[perl/scripts/xchat.git] / Xchat / XPI.pm
index f06e15970c6530623e1fc0918c675db131171a94..6927d83b59e83e425ff03143dec7e70072c8c1e9 100644 (file)
@@ -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 {