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