http://www.perlmonks.org?node_id=1036132


in reply to Re^4: a State machine with Roles - possible? (class or instance)
in thread a State machine with Roles - possible?

# Bug ?? say 'Why does this not print ??' if $main_door->DOES('Closed');

This doesn't work because you're mixing Moo and Moose in the same package, not sure if that counts as a bug, but using Moose consistently (or Moo) makes DOES work properly.

Replies are listed 'Best First'.
Re^6: a State machine with Roles - possible? (class or instance)
by mascip (Pilgrim) on May 31, 2013 at 18:23 UTC

    Indeed, now i got it working!

    Now i'm struggling with un-applying the Role, and making a 2D state exmaple (Open/Closed, Unlocked/Locked). I'm stopping for now, might finish on Monday if i feel like it. Or i might just stop as it's not a priority.