Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^5: Centering Text with GD::Image

by pryrt (Abbot)
on Nov 05, 2021 at 13:56 UTC ( [id://11138469]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Centering Text with GD::Image
in thread Centering Text with GD::Image

By quoting me out of context... you've turned what was intended as politeness into what looks like a harsh command

That was not my intention. If that's how it came across, I am truly sorry. I wasn't trying to say that you were being rude or mean; but I can see that my use of "harsh" was too harsh on my side, so again, my apologies.

My main point in that post was actually that the documentation encouraged coding practice that the perl documentation actively discourages -- which is why I went on to edit my post with the rt issue link.

It is meant to show the guts of what's needed; not Perl Best Practices or anything like that

I understand.

IMO, there's a difference between POD not following best practices of warnings and strict, and POD that encourages the use of indirect object notation which is actively discouraged in official documentation. And it would be a simple enough change for the module developers to change those examples away from Perl-4 style indirect object notation which has been actively discouraged since Perl 5.6.0 in 2000. There are about 20-30 instances of = new or = newFromXXX, which would take all of 10 minutes to fix in the docs. (I am probably even going to put in a Pull Request against that issue).

In the end, I think we agree on the general principle that it's better to avoid indirect object notation; and I'm sorry that I used the word "harsh" in describing your admonition against it.

Replies are listed 'Best First'.
Re^6: Centering Text with GD::Image
by hippo (Bishop) on Nov 05, 2021 at 14:23 UTC
    IMO, there's a difference between POD not following best practices of warnings and strict, and POD that encourages the use of indirect object notation which is actively discouraged in official documentation.

    I agree entirely. Most code samples I see in POD are not presented as complete, runnable scripts. This is fine but it is necessary for the reader to understand it and realise that not all the code is necessarily present, including strictures.

    Conversely if there is some deprecated practice actually evident in the code sample as written, then that's a different matter.

    It might be useful to have a way to use Perl::Critic on the snippets within POD in order to catch some of these but I am not aware of a trivial method for doing so.


    🦛

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-03-29 13:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found