Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: [RFC] Review of module code and POD

by Bod (Parson)
on Apr 02, 2021 at 21:17 UTC ( [id://11130737]=note: print w/replies, xml ) Need Help??


in reply to Re: [RFC] Review of module code and POD
in thread [RFC] Review of module code and POD

I am still undecided (or haven't read enough) on how to propagate errors, error messages and error codes to caller all the way up

As you can tell from my code - I am also undecided!
This was something that I hoped people would comment on and I wasn't disappointed.

I am fairly sure that I don't need to go as far as implementing full blown Exceptions, especially for modules that will only ever be used internally. This is the first time I have tried setting an 'error' field within the module to provide a verbose message and it seems to work quite well. Having said that, I would like to adopt more consistency both in this module and for other modules going forward.

I do like the idea of an init(); method although I'm not sure of a situation where I would want to reconnect to the database within the same session.

Log In?
Username:
Password:

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

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

    No recent polls found