]> git.vpit.fr Git - perl/scripts/xchat.git/commitdiff
Fix generation of accessors in Xchat::XPI
authorVincent Pit <vince@profvince.com>
Tue, 23 Mar 2010 10:30:48 +0000 (11:30 +0100)
committerVincent Pit <vince@profvince.com>
Tue, 23 Mar 2010 10:30:48 +0000 (11:30 +0100)
Xchat/XPI.pm

index db07c1ca37e7f20a69936d2023e99b9f59a3d785..2c42115dee05bdfac6611f05bf9c298de9629652 100644 (file)
@@ -60,7 +60,9 @@ sub new {
  return $ph;
 }
 
-eval "sub $_ { *\$_[0]->{$_} }" for @attributes;
+BEGIN {
+ eval "sub $_ { my \$ph = \$_[0]; *\$ph->{$_} }" for @attributes;
+}
 
 sub print {
  my $ph = shift;