Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Module Loading via Exporter doubt.

by Joost (Canon)
on Jul 11, 2005 at 13:40 UTC ( [id://473929]=note: print w/replies, xml ) Need Help??


in reply to Module Loading via Exporter doubt.

  • There usually isn't any need for using Exporter in an OO module.
  • You can use use base 'Exporter'; instead of the 2 lines. Just use Exporter; will not set up the inhertance of exporter. The normal use of Exporter is that your module inherits the import() method from it, even if the rest of the modules usually isn't OO.
  • You need to setup the @EXPORT, @EXPORT_OK and/or %EXPORT_TAGS package variables in order to export anything. Exporter's import() method will use those to determine what to export when your module is use()d. This is explained in the Exporter documentation.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://473929]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-04-23 07:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found