v_melnik has asked for the wisdom of the Perl Monks concerning the following question:
Dear monks,
I have a Moose-class based on the Throwable superclass, let's call it MonkeyMan::Error.
I'd like to create a bunch of subclasses based on MonkeyMan::Error, such as MonkeyMan::Error::Unrecoverable, MonkeyMan::Error::Unrecoverable::BrainDamage and so on, but I don't want to create all these packages manually.
Can I initialize all these subclasses by some Moose-magic inside of the MonkeyMan::Error class?
Thank you!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Moose: creating sub-classes on the fly
by tobyink (Canon) on Oct 10, 2014 at 16:02 UTC | |
by v_melnik (Scribe) on Oct 13, 2014 at 12:31 UTC | |
|
Re: Moose: creating sub-classes on the fly
by ikegami (Patriarch) on Oct 10, 2014 at 16:02 UTC | |
by McA (Priest) on Oct 10, 2014 at 16:36 UTC | |
by ikegami (Patriarch) on Oct 10, 2014 at 17:06 UTC | |
by tobyink (Canon) on Oct 10, 2014 at 21:36 UTC | |
by ikegami (Patriarch) on Oct 13, 2014 at 17:20 UTC |