Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

comment on

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

The problem is that when called through CGI::Ajax, 'BUILD_CHART' doesn't utilize runmodes. It dynamically builds the XMLHTTP request and, as far as i can tell, is able to bypass the instance script altogether.

Sure it does not all work together out of the box. But I've given suggestions as to how to make it work.

It occurred to me while talking this over with a coworker that it's likely going to require a port from cgi to mod_perl to achieve the persistent connection in the background.

There is nothing in what you are trying to do that requires this. As I mentioned already, you are going to have to do one of A) modify CGI::App or CGI::Ajax to your liking, B) use the CGI::App plugin system to make a shim for what you need, or C) subclass one or the other or both to get the CGI::App object in to the CGI::Ajax callback.

Again, at the very least, if you simply call:

my $dbh = MyApp->new->dbh;

in the CGI::Ajax callback you should be all set.

In reply to Re^3: Using CGI::Ajax and CGI::Application::Plugin::DBH by trwww
in thread Using CGI::Ajax and CGI::Application::Plugin::DBH by jrsimmon

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 the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others browsing the Monastery: (7)
    As of 2019-11-18 23:59 GMT
    Find Nodes?
      Voting Booth?
      Strict and warnings: which comes first?

      Results (93 votes). Check out past polls.