Skip Menu |

This queue is for tickets about the Net-GrowlClient CPAN distribution.

Report information
The Basics
Id: 76138
Status: new
Priority: 0/
Queue: Net-GrowlClient

People
Owner: Nobody in particular
Requestors: MAUKE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.02
Fixed in: (no value)



Subject: Net::GrowlClient breaks modules by exporting @ISA/$VERSION
See the attached file for a test case. Basically, Net::GrowlClient will break any class or OO module that uses it because (for some reason) it exports its $VERSION and @ISA, thereby overwriting the caller's. Symptoms of this bug: - Inheritance is broken. Because @Net::GrowlClient::ISA is empty, any attempt to use an inherited method will die. - Modules may report a wrong version. Suggested fix: Simply remove lines 11 .. 13 of Net/GrowlClient.pm. Exporting $VERSION and @ISA is broken, and exporting methods like 'notify' makes no sense. In the mean time, a workaround for this problem is to replace 'use Net::GrowlClient;' by 'use Net::GrowlClient ();' in user code.
Subject: try.pl
#!/usr/bin/perl use warnings; use strict; { package Animal; sub new { my $class = shift; bless {}, $class } } { package Dog; use base qw(Animal); use Net::GrowlClient; # XXX sub bark { print "woof!\n"; } } my $rex = Dog->new(); $rex->bark(); __END__ $ perl try.pl Can't locate object method "new" via package "Dog" at try.pl line 25.