Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: Accessing catalyst app outside request/response cycle

by mzedeler (Pilgrim)
on Dec 06, 2012 at 23:04 UTC ( [id://1007671]=note: print w/replies, xml ) Need Help??


in reply to Re: Accessing catalyst app outside request/response cycle
in thread Accessing catalyst app outside request/response cycle

I get your point, but this is one of the edge cases where I am kindly asking for a shotgun and will promise to miss the best I can when I try to blow off my foot.

The thing is that this application is maintaining an object cache which can only be updated between requests because the cache maintenance may very long time. I've managed to hook into the request cycle right after the request has been served, but at this point, the context is gone (which is a requirement because I need to be absolutely sure that nothing from the request pollutes the cache or vice versa), so how do I access the model instance?

I tried just calling the model() class method, but it fails with a rather odd "You must pass a package name and it cannot be blessed". As far as I can see, Catalyst seems to accept that you call model() as a class method almost all the way, but at the end of the method where it for some reason tries to call ACCEPT_CONTEXT(). I don't know enough about Catalyst to claim that this is a bug, but it looks weird.

  • Comment on Re^2: Accessing catalyst app outside request/response cycle

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2024-04-20 03:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found