Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: END in packages

by John M. Dlugosz (Monsignor)
on Aug 26, 2001 at 04:37 UTC ( #107875=note: print w/replies, xml ) Need Help??


in reply to END in packages

The loader cares about the last statement executed, and that will be the main-line code. The creation of a sub, even a special one like END, doesn't cause the contents of that sub to be run--your 1 is not seen 'till it's called. END is not called when a module is loaded, but when it's terminated.

In a related thread, the idea of using return 1; at the end of the module was raised, as being clearer.

Replies are listed 'Best First'.
Re (tilly) 2: END in packages
by tilly (Archbishop) on Aug 26, 2001 at 05:44 UTC
    But stylistically something has to be said for ending with:
    "Just another Perl hacker,\n";
      True enough (Pun intended).

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2020-12-04 04:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you use taint mode?





    Results (58 votes). Check out past polls.

    Notices?