Think about Loose Coupling | |
PerlMonks |
Re^3: Error handling in Mojoliciousby Fletch (Bishop) |
on Jul 08, 2021 at 19:05 UTC ( [id://11134812]=note: print w/replies, xml ) | Need Help?? |
Not to disparage Mojo (or marto :) but that's one of the places where I have qualms about its docs. Some of the Mojo samples aren't what you should be aiming at because lots of places they'll show just chaining call after call after call. While it shows how simple things can be with Mojo it's eliding how you'd probably want to do it in a "real" application (and I'm speaking theoretically with large grains of salt here as I've never really done much in anger with Mojo myself). Taking your sample code (which was just the kind of thing I was trying to draw out :) I were I doing something like this in a production manner my inclination would be to put checking in the places that interface with the outside world.
(Again, Mojo novice so I'm sure I may be corrected too.)
The cake is a lie.
In Section
Seekers of Perl Wisdom
|
|