]> git.vpit.fr Git - perl/scripts/xchat.git/blobdiff - Xchat/XPI.pm
Fix generation of accessors in Xchat::XPI
[perl/scripts/xchat.git] / 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;