I'm about to disagree to a greater or lesser extent with a lot of your points here. Most of them are (I hope you will agree) subjective so please treat these responses as just my own opinions.

  1. In general, separation of concerns is good and I am a firm proponent of the Unix Philosophy. However, since a trolley without a facility to check out is pretty useless and a checkout without a trolley equally so I humbly suggest that this is at least not as big a deal for this module as it might be elsewhere and may not even be desirable here at all. Bod should indeed consider it, as you have said.
  2. I agree here, unless the items in the array can be referenced by their index but that sounds like even more work in this instance.
  3. Considering alternatives like Moo is a worthwhile exercise but also remember that TANSTAAFL.
  4. Again, TANSTAAFL. Lots of devs swear by exceptions. Other devs swear at exceptions. I'm fairly ambivalent on them. To use them well you need structure and that means a framework and that means more dependencies. Just be aware of the costs of using them or not.
  5. This is the one I really disagree with. No doubt some people find unless tricky. Pick any feature of the language and some people will find it tricky. But does a module author care what others find tricky? Postfix deref drives me nuts but that doesn't mean that module authors should stop using it. Further, I actively like unless because it means that horrible things like if (!$foo || !$bar || !$baz) { ... } become unless ($foo && $bar && $baz) { ... } which is (subjectivity klaxon) much clearer to read and in intent. The only reason it doesn't fully scale is that there is no elsunless to correspond to elsif which is an oversight in the Perl language and not an inherent flaw with unless itself. Bod should feel entirely free to use unless throughout his code in the same manner that you should feel entirely free to eschew it in yours.
  6. I completely agree (phew :-)

I am neither intending nor expecting to change any of your opinions by posting this but am trying to provide an opposite view so that Bod and others are aware of the contrary viewpoints.


🦛


In reply to Re^2: [RFC] Module code and POD for CPAN by hippo
in thread [RFC] Module code and POD for CPAN by Bod

Title:
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, details, 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, summary, 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.