Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Well, if the application is small enought to fit to one file, your arguments are valid

If application already consists of several files (i.e. it's not a small 500 lines script), the benefits I described outweigh that fact that you need another file

You added the need to chase off and track through where this module file lives -- not always obvious with lib, site/lib, site/vendor/lib

It must be irrelevant if we talk about CPAN deploy. More that that, if user has a mess with @INC dir, it's actually better to have all application files in one @INC dir, than having half of application is @INC and half in bin (/usr/bin, /usr/local/bin/ ~/bin /opt/myapp/bin etc) (if we assume that there is a mess with @INC, we can assume there is a mess with $PATH too)

Having site/lib, site/vendor/lib is actually a feature, so people can deploy with CPAN or with OS package manager at same time, it's an advantage

extra file

Minor issue, if you already have several files

an extra level of callback trace

There won't be extra level of stacktrace if you just split code to files. Extra level added if you split it to subroutines

So it's valid argument if we talk about having some startup code in one "main" subroutine vs having some code unwrapped to subroutine in main package

callback trace to every error message

Imho stacktrace should appear if unexpected/programmer error happened (assertion, like "confess"), otherwise there should be clear error message and no stacktrace is needed. But it's probably matter of script quality

In reply to Re^5: Main routines, unit tests, and sugar by vsespb
in thread Main routines, unit tests, and sugar by stephen

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

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others imbibing at the Monastery: (8)
    As of 2018-06-22 19:23 GMT
    Find Nodes?
      Voting Booth?
      Should cpanminus be part of the standard Perl release?

      Results (124 votes). Check out past polls.