Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

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

by mzedeler (Pilgrim)
on Dec 06, 2012 at 23:04 UTC ( #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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1007671]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2018-05-26 17:54 GMT
Find Nodes?
    Voting Booth?