in reply to Re^4: a State machine with Roles - possible? (class or instance)
in thread a State machine with Roles - possible?
But since Moose roles operate on classes you'll be restricted on a singleton class, i.e. just one object (resp. all objects with the same state.)
But again theoretical thoughts, maybe better if I refrain from this subject.
But thanks for bringing it up, I learned a lot.
Cheers Rolf
( addicted to the Perl Programming Language)
PS: I just remember that I once had a similar requirement which I solved with a state attribute.
So calling $self->{state}{method}() solved it for me and I was able to have multidimensional states per object.
Thats very similar to the already proposed proxy-methods.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: a State machine with Roles - possible? (class or instance)
by james2vegas (Chaplain) on May 30, 2013 at 20:41 UTC | |
by LanX (Saint) on May 30, 2013 at 23:13 UTC | |
by mascip (Pilgrim) on May 31, 2013 at 16:41 UTC | |
by LanX (Saint) on May 31, 2013 at 19:40 UTC | |
by mascip (Pilgrim) on Jun 01, 2013 at 10:15 UTC | |
|