I am trying to have an aliased sub run in a diffrent package. That was the question.
Now about the practical use, I fiddle a lot with packages to allow users to write scripts (in my build system) without having to think about the details. In this case, we avoid using an object oriented syntax. The build system pushes the user scripts in a package (dynamicaly computed). wehen multiple scripts are run simulteanously, the rules defined in each script gets assigned to a particular package so nothing gets mixed. This sytem works very good but has the disadvantage of being a bit slow. I was thinking of caching the packages and aliasing them instead for re-loading them but the aliased functions must be called in the aliasing package. Since I got that idea, I found out that this caching system doesn't bring much speed but I still am curious about how to fiddle with packages when it comes to alised subs.
A description of the build system can be found on the "perl nordic workshop" web site. If anyone is interrested in a build system written in perl and scriptable with perl, you can have a look at the slides then contact me.
Cheers, Nadim.
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.