From: Vincent Pit Date: Tue, 23 Mar 2010 10:30:48 +0000 (+0100) Subject: Fix generation of accessors in Xchat::XPI X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=c89e62b2896ac98ebdfac7d77d6dc31e2db3c6a5;p=perl%2Fscripts%2Fxchat.git Fix generation of accessors in Xchat::XPI --- diff --git a/Xchat/XPI.pm b/Xchat/XPI.pm index db07c1c..2c42115 100644 --- a/Xchat/XPI.pm +++ b/Xchat/XPI.pm @@ -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;