# New Ticket Created by Michael G Schwern
# Please include the string: [perl #101976]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=101976 >
I noticed that the module example in perlmod is a bit long, crufty and out of
date. I wouldn't teach someone to write a module like that. It hasn't been
seriously touched in about 10 years. This patch fixes up the most glaring
problems while retaining its utility as a teaching boilerplate.
* require Exporter instead of use with no import
* Declare and initialize variables together.
* Eliminate archaic RCS/CVS versioning clutter.
* Explain what @ISA does.
* Remove archaic (and slower) &func syntax from exporting
* Remove %EXPORT_TAGS. It's not explained and rarely used.
* Remove redundant @EXPORT_OK
* Use cleaner $priv_func->() syntax rather than &$priv_func.
* Eliminate prototypes, they're clutter, rarely used and dangerous.
--
125. Two drink limit does not mean two kinds of drinks.
-- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army
http://skippyslist.com/list/
Thread Previous
|
Thread Next