Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: sub Issue include

by Stevie-O (Friar)
on Dec 17, 2004 at 20:56 UTC ( #415773=note: print w/ replies, xml ) Need Help??


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


Comment on Re: sub Issue include
Select or Download Code
Re^2: sub Issue include
by Anonymous Monk on Dec 17, 2004 at 20:56 UTC
    No its just another perl script.
      You're being exceedingly brief here.

      Please paste some actual code so that we may understand just what it is you're doing.

      --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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://415773]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2014-12-25 17:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (161 votes), past polls