Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re^3: Writing Modules/namespace polution

by chas (Priest)
on Mar 16, 2005 at 18:26 UTC ( #440074=note: print w/replies, xml ) Need Help??

in reply to Re^2: Writing Modules/namespace polution
in thread Writing Modules/namespace polution

Well, I just checked in the Camel books. The 3rd edition does indicate "require Exporter;" in modules, but the 2nd edition (which I learned from) has "use Exporter;" in modules in most of the examples (although there was a "require Exporter;" in an example.) Randal Schwartz's book "Learning Perl Objects, References & Modules" says "...As a module author, all you do is add:
use Exporter; our @ISA = qw(Exporter);
I just made a module skeleton using h2xs, and "require Exporter;" appears in the module file. So maybe either will suffice..I'll go with the "require" form since that's what h2xs produced.
(Update: Hadn't seen Dragonchild's reply yet - that seems to settle the difference. Fixed typo.)

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2021-07-27 11:39 GMT
Find Nodes?
    Voting Booth?

    No recent polls found