X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=Xchat%2FXPI.pm;h=f06e15970c6530623e1fc0918c675db131171a94;hb=d0506fe825279c4658116b8b09fabf51f943a8cd;hp=db07c1ca37e7f20a69936d2023e99b9f59a3d785;hpb=7088940630753b96c6584e759e53f41044e833d1;p=perl%2Fscripts%2Fxchat.git diff --git a/Xchat/XPI.pm b/Xchat/XPI.pm index db07c1c..f06e159 100644 --- a/Xchat/XPI.pm +++ b/Xchat/XPI.pm @@ -7,7 +7,7 @@ use Tie::RefHash; use Xchat; -our $VERSION = '0.04'; +our $VERSION = '0.05'; use constant { COLOR_TAG => "\00307" }; @@ -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; @@ -123,12 +125,4 @@ sub PRINT { shift->print(@_) } sub PRINTF { shift->printf(@_) } -my $ph = __PACKAGE__->new( - name => 'Extended Xchat Perl Interface', - desc => 'Adds extended support for Perl scripts', - author => 'Vincent Pit (VPIT)', - email => 'perl@profvince.com', - url => 'http://www.profvince.com', -); - 1;