Skip Menu |

This queue is for tickets about the Class-Prototyped CPAN distribution.

Report information
The Basics
Id: 51813
Status: resolved
Priority: 0/
Queue: Class-Prototyped

People
Owner: TEVERETT [...] cpan.org
Requestors: MSCHILLI [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.10
Fixed in: 1.11



Subject: newPackage() creates incomplete classes
Something between 1.01 and 1.10 changed, so that use Class::Prototyped; my $class = Class::Prototyped->newPackage( "Wonko::Wonko", log => sub { print "log!!!\n"; }, ); my $a = Wonko::Wonko->new(); $a->log("blah"); breaks in 1.10 with Can't locate object method "log" via package "PKG0x9226f60" There's a change note that indicates there was a modification that wasn't backwards compatible, but it's not clear to me what actually happened. Is breaking the above snippet intended? If so, what would be the correct way of accomplishing the same functionality in the new release? Thanks for any help. -- Mike
Subject: Re: [rt.cpan.org #51813] newPackage() creates incomplete classes
Date: Mon, 23 Nov 2009 05:34:50 -0900
To: Michael_Schilli via RT <bug-Class-Prototyped [...] rt.cpan.org>
From: Toby Ovod-Everett <toby [...] ovod-everett.org>
On Sun, Nov 22, 2009 at 07:05:34PM -0500, Michael_Schilli via RT wrote: Show quoted text
> Sun Nov 22 19:05:25 2009: Request 51813 was acted upon. > Transaction: Ticket created by MSCHILLI > Queue: Class-Prototyped > Subject: newPackage() creates incomplete classes > Broken in: 1.10 > Severity: Critical > Owner: Nobody > Requestors: MSCHILLI@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=51813 > > > > Something between 1.01 and 1.10 changed, so that > > use Class::Prototyped; > > my $class = Class::Prototyped->newPackage( > "Wonko::Wonko", > log => sub { print "log!!!\n"; }, > ); > > my $a = Wonko::Wonko->new(); > $a->log("blah"); > > breaks in 1.10 with > > Can't locate object method "log" via package "PKG0x9226f60" > > There's a change note that indicates there was a modification that > wasn't backwards compatible, but it's not clear to me what actually > happened. > > Is breaking the above snippet intended? If so, what would be the correct > way of accomplishing the same functionality in the new release? > > Thanks for any help.
What version of Perl are you running? If you're running 5.10, you'll need Class::Prototyped 1.11. From the 1.11 Changes: 1.11 Tue Dec 18 2007 . . . . - Added @$isa=@$isa changes to workaround @ISA issues in 5.10.0. Note that I still haven't moved to 5.10 anywhere, so I haven't done very extensive 5.10 testing, but we ran into problems with 5.10.0 right as 5.10.0 was ready for release. If you're curious as to why, read this thread: http://aspn.activestate.com/ASPN/Mail/Message/perl5-porters/3590641 *fingers crossed that this is your bug* --Toby Ovod-Everett
On Mon Nov 23 09:35:08 2009, toby@ovod-everett.org wrote: Show quoted text
> What version of Perl are you running? If you're running 5.10, you'll
Show quoted text
need> Class::Prototyped 1.11.
Gotcha, I was running perl-5.10 and Class::Prototyped-1.10. I'll give 1.11 a try, thanks for the quick response.