in reply to Re: How's My Style Now?
in thread How's My Style Now?

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:

use RJTD::Main qw/ get_script_variables panel_start panel_end footer / +; use RJTD::Center qw/ get_general_text page_heading /; #... later get_general_text('musing_cat',1);

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,
    Dean