Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re^2: Perl Module ending without 1;

by JavaFan (Canon)
on Jul 18, 2009 at 19:36 UTC ( #781376=note: print w/ replies, xml ) Need Help??

in reply to Re: Perl Module ending without 1;
in thread Perl Module ending without 1;

A module file must end with a true value.
No, a module must return a true value. Many people don't realize that when a module is loaded with use, its code is actually run. Of course, if the module just contains subs, little code is run; but most modules assign a version number, set @ISA or @EXPORT/@EXPORT_OK. All these assignments wouldn't happen if the code in the module wasn't run.

Comment on Re^2: Perl Module ending without 1;
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2014-12-27 05:29 GMT
Find Nodes?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?

    Results (176 votes), past polls