in reply to Re: use vs. require in LWP::Simple
in thread use vs. require in LWP::Simple

Thanks for the explanation.
I made the experiment of putting an 'import' in the routine.

require LWP::Simple; import LWP::Simple; my($content) = get($url);
Now the get works without the explicit package namespace.

Not sure what if any damage I'm doing using an import with zero idea of proper arguement. So I'll keep the explicit use of LWP::Simple namespace for the moment.

Thanks again
Claude

Replies are listed 'Best First'.
Re: Re: Re: use vs. require in LWP::Simple
by repson (Chaplain) on Apr 22, 2001 at 16:45 UTC
    The arguments to import or use are simply (for most modules) the names of the subs or variables to be imported. It is generally preferable to only import the things you will use, so as to avoid cluttering the main:: namespace. On the other hand sometimes you will want to import things that are not imported by default.

    You probably want

    use LWP::Simple 'get'; # or require LWP::Simple; import LWP::Simple 'get'; # which actually parses as LWP::Simple->import('get');