Welcome to the Monastery | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I second the module suggestion and sdd a couple of things to jethro's comments. When you do create modules, do not use lower-case module names. Lower-case names are (by convention) reserved for pragmatic modules (in effect compiler directives). Additionally, placing your modules into a provate namespace can protect against name collision. For instance, you could use your initials so that require './library/main.pl'; becomes use RJTD::Main; (See also: perlmodstyle, perlnewmod, perlmod) I also find the # center.pl comments a bit jarring, though my recommended alternative would be to document their origin at the beginning of the file like so1:
This way, you do not need to document each use of the function since you know that the list of imported functions is always at the top of the file. 1 When creating your modules use @EXPORT_OK rather than @EXPORT; See Exporter. Update: Split EXPORT vs EXPORT_OK into footnote so that things makes sense. Good Day, In reply to Re^2: How's My Style Now?
by duelafn
|
|