Greetings wise monks,
This time I need help with Moose.
Currently I'm writing some sort of "Addon/Plugin" thingy for a project.
The start.pl starts, creates an instance of the Addon-"Controller" class which looks into the AddOn Folder and returns a list of valid AddOns.
The user then selects an AddOn (not really a "plugin/addon" but a programm).
The AddOn-Controller then includes the corresponding Class, creates an instance of it and runs a (defined/required) subroutine. The other AddOns/classes are ignored and not loaded.
Or at least that's what should happen.
The original version of the script included the selected class via require but then I wanted to improve the system and found Moose.
Moose looked great and I wanted to try it out.
I tried many things & tips I found via Google but I can't include the selected class while ignoring the other ones.
If I include them in a static way the class, which I include last, overrides the start subs in the other classes (no sureprise).
So in short:
Can somebody give me a hint how I can do some sort of dynamic inheritance with Moose? Is it possible?
The Cookbook & documentation on CPAN gave me the impression that it's possible but I couldn't implement it into my own programm.
Thank you for your help/advice in advance,
Shinama
EDIT SAYS:
Another problem solved, see
Re^2: Dynamic inheritance with Moose?
Thanks again for your help :)
---------------------------------------------------
"You read too much and understand too little."
Moiraine Damodred (The Wheel of Time)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.