Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: creating class base modules

by aging acolyte (Pilgrim)
on Dec 17, 2002 at 16:17 UTC ( #220566=note: print w/replies, xml ) Need Help??

in reply to creating class base modules

On a similarly simple question regarding using classes.

What are the advantages/disadvantages in using

export= qw( &new &feed )
or export_ok

Do things need to be exported?


A.A. Update Sorry I realise that this is a bit off topic and should have appeared as an seperate question

Replies are listed 'Best First'.
Re: Re: creating class base modules
by pfaut (Priest) on Dec 17, 2002 at 16:27 UTC

    export forces the listed symbols into the callers namespace. export_ok allows the listed symbols to be pulled into the callers namespace. export_ok is nicer as it gives the user of your module the choice. See Exporter for details.

    Exports pollute the namespace of the module user. If you must export try to use @EXPORT_OK in preference to @EXPORT and avoid short or common symbol names to reduce the risk of name clashes.
    --- print map { my ($m)=1<<hex($_)&11?' ':''; $m.=substr('AHJPacehklnorstu',hex($_),1) } split //,'2fde0abe76c36c914586c';

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://220566]
What's the matter? Cat got your tongue?...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2018-01-22 08:33 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (233 votes). Check out past polls.