in reply to sub Issue include
What do you mean, 'your sub just includes another file'?
Do you mean it reads a file into memory, and you want to reread that file every time in the subroutine? If so, that's easy. Just move the code that reads the file into your sub.
Or do you mean it loads a *module*? If that's the case, you need to do a little more work. You need to tell Perl to forget that it's loaded the module, and then re-use the module;
sub foo { delete $INC{'My/Cool/Module.pm'); no warnings 'redefined'; require My::Cool::Module; # etc. etc. etc. }
And if it's neither of those things, I have no idea what you're trying to do.
--Stevie-O
$"=$,,$_=q>|\p4<6 8p<M/_|<('=> .q>.<4-KI<l|2$<6%s!<qn#F<>;$, .=pack'N*',"@{[unpack'C*',$_] }"for split/</;$_=$,,y[A-Z a-z] {}cd;print lc
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: sub Issue include
by Anonymous Monk on Dec 17, 2004 at 20:56 UTC | |
by Stevie-O (Friar) on Dec 17, 2004 at 20:59 UTC |
In Section
Seekers of Perl Wisdom