Adding the use statements to a different file



Hi,

I have to write several perl scripts with a number of modules included.
Therefore, I have to type many "use" statements at the top of each script. Is
there a way to dump all these "use" statements in a different file and then just
include that file everytime I have to include these "use" statements?

I know that writing a module is a great way to do something like that, but
doesn't a module export variables and subroutines? How can I make a module
export "use" statements?

Thanks.

Vishal


----------------------------------------
This mail sent through www.mywaterloo.ca
.



Relevant Pages

  • Re: Adding the use statements to a different file
    ... I have to write several perl scripts with a number of modules included. ... Modules do not export variables and subroutines; ... packages can export variables and subroutines to ... SS Heart of Gold, _The Hitchhiker's Guide to the Galaxy_ ...
    (perl.beginners)
  • Re: best practice ... requires
    ... In main.cgi i have some other perl scripts that have subroutines ... $filebase = cwd; ... If you also import symbols from some.lib and the subroutines are in a separate package, it's better to require the library from the script that is using the subs. ...
    (comp.lang.perl.misc)
  • Re: Proxy server, how does it work?
    ... They are just perl scripts that simulate a web browser. ... Free Privacy Resources ... Prev by Date: ...
    (alt.2600)
  • Re: best practice ... requires
    ... I have a main cgi script ... ... In main.cgi i have some other perl scripts that have subroutines ... Yes, as already noted, package variables defined ... This applies to subroutines as well. ...
    (comp.lang.perl.misc)
  • best practice ... requires
    ... i'm having trouble with variables ... I have a main cgi script ... ... In main.cgi i have some other perl scripts that have subroutines ...
    (comp.lang.perl.misc)