Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

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

by stonecolddevin (Parson)
on Feb 17, 2015 at 17:15 UTC ( #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 (Bishop) 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
Node Status?
node history
Node Type: note [id://1117019]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2020-06-02 09:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?



    Results (16 votes). Check out past polls.

    Notices?