use module

Hi

What is the difference between
use Module
use Module ()
use Module (func1 func2)
?
And, what is the different require and use?

Thanks
a [ Sa, 03 März 2007 11:13 ] [ ID #1646762 ]

Re: use module

In article <NSbGh.1206825$5R2.262557 [at] pd7urf3no>,
"a" <a [at] mail.com> writes:

> What is the difference between
> use Module
> use Module ()
> use Module (func1 func2)
> ?
> And, what is the different require and use?

``perldoc -f use'' and ``perldoc -f require'' explain it better than
I could.

--
erik [at] selwerd.nl
Erik [ Sa, 03 März 2007 16:14 ] [ ID #1646763 ]

Re: use module

"a" <a [at] mail.com> wrote in message news:NSbGh.1206825$5R2.262557 [at] pd7urf3no...
> Hi
>
> What is the difference between
> use Module
Will import only whatever is in [at] Module::EXPORT

> use Module ()
will import nothing.

> use Module (func1 func2)
will import only func1 and func2 (but only if func1 and func2 are in
[at] Module::EXPORT_OK).

See 'perldoc Exporter'.

Note that functions that have not been imported can still be accessed, but
to do that they have to be called by their fully qualified names - ie
Module::func1() and Module::func2(), instead of just func1() and func2().

Cheers,
Rob
Sisyphus [ So, 04 März 2007 00:31 ] [ ID #1646767 ]

Re: use module

On Mar 3, 6:31 pm, "Sisyphus" <sisyph... [at] nomail.afraid.org> wrote:
> "a" <a... [at] mail.com> wrote in messagenews:NSbGh.1206825$5R2.262557 [at] pd7urf3no...
> > Hi
>
> > What is the difference between
> > use Module
>
> Will import only whatever is in [at] Module::EXPORT
>
> > use Module ()
>
> will import nothing.
>
> > use Module (func1 func2)
>
> will import only func1 and func2 (but only if func1 and func2 are in
> [at] Module::EXPORT_OK).

.... or [at] Module::EXPORT

Paul Lalli
Paul Lalli [ So, 04 März 2007 04:13 ] [ ID #1647336 ]
Perl » comp.lang.perl.modules » use module

Vorheriges Thema: What's the difference between /usr/(lib|share)/(perl|perl5)?
Nächstes Thema: Test::Pod problems