Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: [RFC] Module code and POD for CPAN

by hippo (Bishop)
on Apr 14, 2021 at 12:43 UTC ( [id://11131270]=note: print w/replies, xml ) Need Help??


in reply to Re: [RFC] Module code and POD for CPAN
in thread [RFC] Module code and POD for CPAN

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.


🦛

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11131270]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2024-03-29 00:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found