Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^5: a State machine with Roles - possible? (class or instance)

by james2vegas (Chaplain)
on May 30, 2013 at 20:31 UTC ( #1036132=note: print w/ replies, xml ) Need Help??


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.


Comment on Re^5: a State machine with Roles - possible? (class or instance)
Download Code
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1036132]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2014-11-27 05:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (180 votes), past polls