Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

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.

In reply to Re^2: Accessing catalyst app outside request/response cycle by mzedeler
in thread Accessing catalyst app outside request/response cycle by mzedeler

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others drinking their drinks and smoking their pipes about the Monastery: (2)
    As of 2017-12-17 14:16 GMT
    Find Nodes?
      Voting Booth?
      What programming language do you hate the most?

      Results (464 votes). Check out past polls.