Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: How To Pass A DateTime Object in $c->flash

by Your Mother (Archbishop)
on May 04, 2016 at 00:22 UTC ( [id://1162139]=note: print w/replies, xml ) Need Help??


in reply to How To Pass A DateTime Object in $c->flash

The error message is right. When you “put away” a DBIC result(set) it loses its context. You have to give it back, as the message suggests. I’ve never broken down and gone that route so I can’t help with an example but I’m sure there are some in the mail archives, etc.

Storing data in the flash might be better. It’s much faster, and safer. You won’t accidentally expose things. DBIC objects, while “live,” contain all their context, connection, and relationships, and data that might be private compared to what you want to show. Downside is some logic moves to the Controller… I use this often–DBIx::Class::ResultSet::HashRef. It dovetails nicely with Catalyst::View::JSON and such.

  • Comment on Re: How To Pass A DateTime Object in $c->flash

Replies are listed 'Best First'.
Re^2: How To Pass A DateTime Object in $c->flash
by phildeman (Scribe) on May 04, 2016 at 11:07 UTC

    Thanks. I thought I was loosing my mind. I will read up on the DBIxClass::ResultSet:: HashRef documentation.

    -Phil-

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-04-20 00:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found