in reply to Playing with package spaces

PS. there is a practical use that I'll gladely if someone is interrested.
Please do. I'm sure I'm not the only one wondering what exactly you're trying to accomplish here.

Replies are listed 'Best First'.
Re^2: Playing with package spaces
by Anonymous Monk on Jun 10, 2004 at 22:24 UTC
    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.