Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Using a module more than once

by blazar (Canon)
on Aug 02, 2005 at 15:28 UTC ( [id://480231]=note: print w/replies, xml ) Need Help??


in reply to Using a module more than once

Is this bad practice? Will it hurt anything? (I assume "no" to both questions, but I could be wrong.)
I don't think so, unless these modules do something really strange. In which case you would probably already know from their documentation. See e.g.:
#! /usr/bin/perl -l use strict; use warnings; use lib sub { print pop; undef }; use File::Find; use File::Basename; use File::Find; __END__
which gives me
File/Find.pm warnings/register.pm Cwd.pm vars.pm XSLoader.pm File/Basename.pm re.pm File/Spec.pm File/Spec/Unix.pm Scalar/Util.pm List/Util.pm DynaLoader.pm AutoLoader.pm

Replies are listed 'Best First'.
Re^2: Using a module more than once
by VSarkiss (Monsignor) on Aug 02, 2005 at 16:27 UTC
      perldoc -f require will explain it better than I ever could. It was a big discovery for me too. Of course you can exploit this feature to do more {bizarre,uselful} things.
Re^2: Using a module more than once
by kwaping (Priest) on Aug 02, 2005 at 15:32 UTC
    Thanks! That's the kind of factual confirmation I was hoping to get.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-25 23:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found