in reply to Re^7: Can't locate object method- Issue
in thread Can't locate object method- Issue

...not supposed to change your mind...

But this is Perl. ;-) We can re-bless. We can mess with the class inheritance tree. We should be able to mess with roles, too.

I reckon we are the only monastery ever to have a dungeon stuffed with 16,000 zombies.
  • Comment on Re^8: Can't locate object method- Issue

Replies are listed 'Best First'.
Re^9: Can't locate object method- Issue
by Corion (Patriarch) on Oct 01, 2013 at 12:03 UTC

    While Perl allows for more than one way, there are some ways that are clearly not as good as others :-).

    Certainly re-blessing into a class that has imported the appropriate roles is better than manually trying to remove roles from a class. I think much of the functionality of roles is implemented by manually importing the appropriate subroutines in the package namespace, instead of using the @ISA mechanism in the hope of getting the correct implementation of a method. This makes "unimporting" a role quite hard to do.