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

Re^4: do $n exist in grep?

by Marshall (Canon)
on May 12, 2021 at 20:46 UTC ( [id://11132520]=note: print w/replies, xml ) Need Help??


in reply to Re^3: do $n exist in grep?
in thread do $n exist in grep?

Interesting:
return { status => $s, ($optional_field ? (optional_field => $optional_field) : ()), };
I personally would not make a hash key optional like that.
I would always return the hash key and then an undef value for that key if it is not valid.
But as is often said "there is more than one way to do it".
It could also be that I haven't thought this completely through and haven't considered what
the calling code looks like and how it processes this returned info.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2024-04-19 21:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found