Skip Menu |
 
rt.cpan.org will be shut down on March 1st, 2021.

This queue is for tickets about the TAEB CPAN distribution.

Maintainer(s)' notes

Please report bugs at http://github.com/TAEB/TAEB/issues - Thanks!

Report information
The Basics
Id: 90919
Status: open
Priority: 0/
Queue: TAEB

People
Owner: Nobody in particular
Requestors: upasna.shukla [...] gmail.com
Cc:
AdminCc:

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



Subject: New Moose may break your code
Date: Fri, 29 Nov 2013 03:35:11 +0530
To: bug-TAEB [...] rt.cpan.org
From: "Upasana Shukla" <upasna.shukla [...] gmail.com>
Download (untitled) / with headers
text/plain 535b
We recently deprecated Class::MOP::load_class in Moose. It appears that your module is affected. You can read more about the change here: https://metacpan.org/pod/release/ETHER/Moose-2.1106-TRIAL/lib/Moose/Manual/Delta.pod#pod2.1200 We recommend that you take a look at your code to see if it indeed does need to be updated with respect to the latest Moose release, 2.1106-TRIAL. If you have any questions, then please ask either on Moose mailing list : http://lists.perl.org/list/moose.html or on #moose & #moose-dev on irc.perl.org.
Download (untitled) / with headers
text/plain 254b
Attached patch fixes the above issue and the deprecated way to call enum(). However, the tests still fail due to "Can't locate object method "superclasses" via package "TAEB::Display::Curses" error. -- Cheers, ZZ [ https://metacpan.org/author/ZOFFIX ]
Subject: TAEB-0.03.patch
Download TAEB-0.03.patch
text/x-diff 5.4k
diff -Naur TAEB-0.03_orig/lib/TAEB/Config.pm TAEB-0.03/lib/TAEB/Config.pm --- TAEB-0.03_orig/lib/TAEB/Config.pm 2014-01-22 20:07:31.433609128 -0500 +++ TAEB-0.03/lib/TAEB/Config.pm 2014-01-22 20:21:37.837620218 -0500 @@ -1,4 +1,5 @@ package TAEB::Config; +use Class::Load; use Moose; use YAML; use List::Util qw/first/; @@ -164,7 +165,7 @@ ? $controller_class : "TAEB::${controller}::${controller_class}"; - Class::MOP::load_class($controller_class); + Class::Load::load_class($controller_class); return $controller_class; } diff -Naur TAEB-0.03_orig/lib/TAEB/Meta/Types.pm TAEB-0.03/lib/TAEB/Meta/Types.pm --- TAEB-0.03_orig/lib/TAEB/Meta/Types.pm 2014-01-22 20:07:31.433609128 -0500 +++ TAEB-0.03/lib/TAEB/Meta/Types.pm 2014-01-22 20:08:33.229609938 -0500 @@ -8,31 +8,31 @@ =cut -enum 'TAEB::Type::PlayState' => qw(logging_in unable_to_login playing dying); +enum 'TAEB::Type::PlayState' => [qw(logging_in unable_to_login playing dying)]; -enum 'TAEB::Type::Role' => qw(Arc Bar Cav Hea Kni Mon Pri Ran Rog Sam Tou Val Wiz); -enum 'TAEB::Type::Race' => qw(Hum Elf Dwa Gno Orc); -enum 'TAEB::Type::Align' => qw(Law Neu Cha); -enum 'TAEB::Type::Gender' => qw(Mal Fem Neu); +enum 'TAEB::Type::Role' => [qw(Arc Bar Cav Hea Kni Mon Pri Ran Rog Sam Tou Val Wiz)]; +enum 'TAEB::Type::Race' => [qw(Hum Elf Dwa Gno Orc)]; +enum 'TAEB::Type::Align' => [qw(Law Neu Cha)]; +enum 'TAEB::Type::Gender' => [qw(Mal Fem Neu)]; -enum 'TAEB::Type::BUC' => qw(blessed uncursed cursed); -enum 'TAEB::Type::ItemType' => qw(gold weapon armor food corpse scroll spellbook potion amulet ring wand tool gem other); +enum 'TAEB::Type::BUC' => [qw(blessed uncursed cursed)]; +enum 'TAEB::Type::ItemType' => [qw(gold weapon armor food corpse scroll spellbook potion amulet ring wand tool gem other)]; -enum 'TAEB::Type::Tile' => tile_types; +enum 'TAEB::Type::Tile' => [tile_types]; -enum 'TAEB::Type::DoorState' => qw(locked unlocked); +enum 'TAEB::Type::DoorState' => [qw(locked unlocked)]; -enum 'TAEB::Type::Burden' => qw(Unencumbered Burdened Stressed Strained Overtaxed Overloaded); +enum 'TAEB::Type::Burden' => [qw(Unencumbered Burdened Stressed Strained Overtaxed Overloaded)]; -enum 'TAEB::Type::Branch' => qw(dungeons mines sokoban quest ludios gehennom vlad planes); +enum 'TAEB::Type::Branch' => [qw(dungeons mines sokoban quest ludios gehennom vlad planes)]; -enum 'TAEB::Type::Urgency' => qw(critical important normal unimportant fallback none); +enum 'TAEB::Type::Urgency' => [qw(critical important normal unimportant fallback none)]; -enum 'TAEB::Type::Trap' => trap_types; +enum 'TAEB::Type::Trap' => [trap_types]; -enum 'TAEB::Type::Menu' => qw(none single multi); +enum 'TAEB::Type::Menu' => [qw(none single multi)]; -enum 'TAEB::Type::DeathState' => qw(inventory attributes kills conducts summary scores); +enum 'TAEB::Type::DeathState' => [qw(inventory attributes kills conducts summary scores)]; 1; diff -Naur TAEB-0.03_orig/lib/TAEB/OO.pm TAEB-0.03/lib/TAEB/OO.pm --- TAEB-0.03_orig/lib/TAEB/OO.pm 2014-01-22 20:07:31.433609128 -0500 +++ TAEB-0.03/lib/TAEB/OO.pm 2014-01-22 20:21:12.845619889 -0500 @@ -1,4 +1,6 @@ package TAEB::OO; + +use Class::Load; use Moose (); use MooseX::ClassAttribute (); use Moose::Exporter; @@ -17,7 +19,7 @@ # make sure using extends doesn't wipe out our base class roles sub extends { my ($caller, @superclasses) = @_; - Class::MOP::load_class($_) for @superclasses; + Class::Load::load_class($_) for @superclasses; for my $parent (@superclasses) { goto \&Moose::extends if $parent->can('does') && $parent->does('TAEB::Role::Initialize'); diff -Naur TAEB-0.03_orig/lib/TAEB/Role/Initialize.pm TAEB-0.03/lib/TAEB/Role/Initialize.pm --- TAEB-0.03_orig/lib/TAEB/Role/Initialize.pm 2014-01-22 20:07:31.433609128 -0500 +++ TAEB-0.03/lib/TAEB/Role/Initialize.pm 2014-01-22 20:20:57.517619690 -0500 @@ -1,4 +1,5 @@ package TAEB::Role::Initialize; +use Class::Load; use Moose::Role; sub initialize { } @@ -21,7 +22,7 @@ # don't check non-classes next unless $type_constraint->is_a_type_of('Object'); $class = $type_constraint->name; - Class::MOP::load_class($class); + Class::Load::load_class($class); } else { my $value = $attr->get_read_method_ref->($self); diff -Naur TAEB-0.03_orig/lib/TAEB/World.pm TAEB-0.03/lib/TAEB/World.pm --- TAEB-0.03_orig/lib/TAEB/World.pm 2014-01-22 20:07:31.433609128 -0500 +++ TAEB-0.03/lib/TAEB/World.pm 2014-01-22 20:17:49.713617229 -0500 @@ -1,6 +1,7 @@ package TAEB::World; use strict; use warnings; +use Class::Load; use TAEB::Meta::Overload; use Module::Pluggable ( @@ -25,7 +26,7 @@ level => 'error'); return; } - if (eval { local $SIG{__DIE__}; Class::MOP::load_class($role) }) { + if (eval { local $SIG{__DIE__}; Class::Load::load_class($role) }) { return $role; } $role =~ s/::[^:]*$//; diff -Naur TAEB-0.03_orig/Makefile.PL TAEB-0.03/Makefile.PL --- TAEB-0.03_orig/Makefile.PL 2014-01-22 20:07:31.425609128 -0500 +++ TAEB-0.03/Makefile.PL 2014-01-22 20:19:04.361618207 -0500 @@ -5,7 +5,9 @@ name 'TAEB'; all_from 'lib/TAEB.pm'; + # the object system +requires 'Class::Load' => 0.20; requires 'Moose' => 0.71; requires 'MooseX::AttributeHelpers' => 0.09; requires 'MooseX::ClassAttribute' => 0.07;


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.