use module

use module

am 03.03.2007 11:13:01 von a

Hi

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

Thanks

Re: use module

am 03.03.2007 16:14:47 von Erik

In article ,
"a" 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@selwerd.nl

Re: use module

am 04.03.2007 00:31:59 von Sisyphus

"a" wrote in message news:NSbGh.1206825$5R2.262557@pd7urf3no...
> Hi
>
> What is the difference between
> use Module
Will import only whatever is in @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
@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

Re: use module

am 04.03.2007 04:13:10 von Paul Lalli

On Mar 3, 6:31 pm, "Sisyphus" wrote:
> "a" wrote in messagenews:NSbGh.1206825$5R2.262557@pd7urf3no...
> > Hi
>
> > What is the difference between
> > use Module
>
> Will import only whatever is in @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
> @Module::EXPORT_OK).

.... or @Module::EXPORT

Paul Lalli