]> git.vpit.fr Git - perl/scripts/xchat.git/blobdiff - Xchat/XPI.pm
Don't create a plugin object for modules
[perl/scripts/xchat.git] / Xchat / XPI.pm
index db07c1ca37e7f20a69936d2023e99b9f59a3d785..f06e15970c6530623e1fc0918c675db131171a94 100644 (file)
@@ -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;