Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to generate a Moose hash with the keys and values generated by passing in a string such as:
foo=bar,foo2=bar2,foo3=bar3etc.. and then being able to access the value via $self->myhash('foo');
I've tried coerce on a subtype with via => performing the 2 splits required.. I'm missing something.. I can't get this to work no matter what I try.
Can someone point me in the right direction?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Moose coerce
by ikegami (Patriarch) on Oct 20, 2010 at 17:04 UTC | |
by Anonymous Monk on Oct 21, 2010 at 11:18 UTC | |
|
Re: Moose coerce
by zwon (Abbot) on Oct 20, 2010 at 16:52 UTC | |
by Anonymous Monk on Oct 21, 2010 at 10:48 UTC | |
by duelafn (Parson) on Oct 21, 2010 at 12:40 UTC | |
by Anonymous Monk on Oct 21, 2010 at 13:08 UTC |