Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^2: RFC: Creating Dancer2 validation plugin.

by AlexP (Pilgrim)
on May 05, 2022 at 09:31 UTC ( [id://11143588]=note: print w/replies, xml ) Need Help??


in reply to Re: RFC: Creating Dancer2 validation plugin.
in thread RFC: Creating Dancer2 validation plugin.

You highlighted important things there, big thanks!

I agree, that using @_ in args is more straightforward, and it should be used instead of shift.
Also, it's a good idea to leave comments for private methods.

...is there a reason you're intentionally returning undef?

As I know, perl returns the last value from a block, so returning undef is a way to protect from random bugs. Is it unnecessary or there is a better way?

  • Comment on Re^2: RFC: Creating Dancer2 validation plugin.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2024-04-16 13:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found