Beefy Boxes and Bandwidth Generously Provided by pair Networks
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:

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


In reply to Re^2: How's My Style Now? by duelafn
in thread How's My Style Now? by Spenser

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2024-04-19 11:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found