http://www.perlmonks.org?node_id=228102


in reply to A simple import() for those special moments

For the purposes you suggest, it would probably be just fine. You do have an error though; import() will be called with the package name (which is needed for inheritance but you probably don't care about it) so you'll need to shift it off of @_ or your sub will always die.

You also have a small syntax error on your last for line. (No ending paren.)

-sauoq
"My two cents aren't worth a dime.";
  • Comment on Re: A simple import() for those special moments

Replies are listed 'Best First'.
Re^2: A simple import() for those special moments
by Aristotle (Chancellor) on Jan 19, 2003 at 02:43 UTC
    File to post transition problems - I was shifting off the package name to a variable in the code, but it was a remainder from previous attempts I got rid off before posting. Of course, I forgot to change the if accordingly.. I also wasn't using the modifier form of for, that's where the superfluous opening paren (not a missing ending paren ;)) came from.

    Makeshifts last the longest.