cLive ;-) has asked for the wisdom of the Perl Monks concerning the following question:
If I'm only "use"ing a module occasionally in a script (eg, only in one sub that is rarely called), is it better performance-wise to place the "use" statement in that sub? ie:
Or are there other issues I may encounter with this approach?#!/usr/bin/perl -w use strict; ... sub once_in_a_blue_moon { use LWP::Simple; my $page = get('http://www.yahoo.com'); }
More a "hmmmm?" than a "Argh, I must know!!!", but I'm sure you understand...
cLive ;-)
"After my grandfather became ill, my grandmother greased his back. After that, he went downhill very quickly" - Milton Jones
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(Ovid) Re: Using
by Ovid (Cardinal) on Nov 15, 2001 at 04:28 UTC | |
|
Re: Using 'use' away from script start
by ehdonhon (Curate) on Nov 15, 2001 at 08:48 UTC | |
|
Re: Using 'use' away from script start
by Fletch (Bishop) on Nov 15, 2001 at 07:54 UTC | |
|
Re: Using 'use' away from script start
by jmcnamara (Monsignor) on Nov 15, 2001 at 13:29 UTC | |
|
Re: Using 'use' away from script start
by MZSanford (Curate) on Nov 15, 2001 at 14:28 UTC | |
by mischief (Hermit) on Nov 15, 2001 at 19:34 UTC |