Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
honestly it's not only hard to read it's using some suboptimal techniques.

about readability:
  • please consider using perltidy to reformat your code, it solves most problems afoken mentioned
  • use blank lines between logical steps, see commenting in chunks in Perl Best Practices
  • take care about naming conventions and clarity
    hasref seems to mean hash_ref but reads like a boolean has_a_reference
  • avoid deeply nested code!
    e.g. using a dispatcher like $cmd{$line}->() with %cmd=('**'=>\&dump_readme,'*'=>...)
  • prefer self commenting code, like moving code chunks into well named subs

about commenting
  • be sure which audience you are targeting whith your comments
  • you seem to mix POD stuff (i.e. for the user) and dev-comments and (sorry) banalities,
  • line quantity doesn't equal quality
about techniques:
  • your begin block is huge and I'm puzzled why (?)
  • your repeatedly looping with $_ over most of your lines, that's very vulnerable to bugs
  • &sub() in Perl5 is usable in the rare cases where you need to ignore prototypes
All these mentioned problems keep me away to read more and to try it out.

In general I'm sure you would love to have a look into Damian's PBP book.

This book helped me a lot understanding the traps in Perl and I hope it'll help you too! :)

Cheers Rolf

(addicted to the Perl Programming Language and ☆☆☆☆ :)


) if you need to check UserAgent within BEGIN, I'd consider using a second BEGIN block

2) I.e. the top-down structure is hidden

In reply to Re^3: CPAN Namespace Navigator: tree dump feature added. by LanX
in thread CPAN Namespace Navigator by Discipulus

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 the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others cooling their heels in the Monastery: (10)
    As of 2019-02-19 19:02 GMT
    Find Nodes?
      Voting Booth?
      I use postfix dereferencing ...

      Results (105 votes). Check out past polls.

      • (Sep 10, 2018 at 22:53 UTC) Welcome new users!