Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

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.

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.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (12)
As of 2016-10-21 13:11 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (289 votes). Check out past polls.