Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: Catalyst / DBIx::Class - accessing a different table from the model

by stonecolddevin (Parson)
on Feb 17, 2015 at 17:15 UTC ( [id://1117019]=note: print w/replies, xml ) Need Help??


in reply to Re: Catalyst / DBIx::Class - accessing a different table from the model
in thread Catalyst / DBIx::Class - accessing a different table from the model

The only nitpick I have is with "eval and recover". Try::Tiny cleans this up quite nicely, or use Throwable to create actual exceptions and keep things less crappy.

Three thousand years of beautiful tradition, from Moses to Sandy Koufax, you're god damn right I'm living in the fucking past

  • Comment on Re^2: Catalyst / DBIx::Class - accessing a different table from the model

Replies are listed 'Best First'.
Re^3: Catalyst / DBIx::Class - accessing a different table from the model
by Your Mother (Archbishop) on Feb 17, 2015 at 17:34 UTC

    Well, that was back-of-the-napkining. :P I use Try::Tiny sometimes and I rely on /end handling myself; also newer Perls (5.16+ IIRC) do eval+$@ better so it’s not as important a caveat now and frankly I was never bitten by it in the past. I agree that exception objects can be a good idea, I posted a sample on that not long ago, but it’s not something that lends itself to inclusion in snippets.

    (Update: 5.14 is where better eval and $@ came in. Not 5.16 as previously suggested.)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1117019]
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: (3)
As of 2024-04-24 23:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found