]> git.vpit.fr Git - perl/scripts/xchat.git/commitdiff
Propagate compilation errors for autogenerated accessors
authorVincent Pit <vince@profvince.com>
Sat, 10 Mar 2012 10:25:28 +0000 (11:25 +0100)
committerVincent Pit <vince@profvince.com>
Sat, 10 Mar 2012 10:25:28 +0000 (11:25 +0100)
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 {