[cgiapp] Re: Unexpected variable persistence with CAD / CADS

George Hartzell hartzell at alerce.com
Sat Oct 25 13:03:04 EDT 2008


Richard Jones writes:
 > George Hartzell wrote:
 > > Richard Jones writes:
 > >  > Mark Stosberg wrote:
 > >  > 
 > >  > >> It doesn't seem to happen in an identical setup running under mod_perl, 
 > >  > >> so I presume it's a 'feature' of the CAD::Server / HTTP::Server. Is this 
 > >  > >> a known issue, and one of the caveats alluded to in the CAD::Server 
 > >  > >> docs? Never been a problem for anyone else?
 > >  > > 
 > >  > > I haven't used CAD::Server much. Does it also happen with CGI::Application::Server
 > >  > > ( which I think can also work with Dispatch.pm ) ?
 > >  > 
 > >  > Wish I knew. I've never been able to get CA Server working with my 
 > >  > Dispatch subclass. The exact same dispatch table that works in CAD 
 > >  > Server returns either a blank page and no error in the console, or an 
 > >  > error message stating that target must be either a CGI::Application or 
 > >  > CGI::Application::Dispatch subclass, even though they always are. It's 
 > >  > probably something I've mis-configured, but I'll keep at it.
 > >
 > > You didn't actually provide a broken example, so I cobbled one
 > > together that I think does what you're describing, but it doesn't
 > > exhibit the problems you've described.
 > George, the 'wish I knew' reply was to Mark re the CA::Server failure to 
 > ever work. I've traced the problem to the lines in handle_request() 
 > which test $target->isa(), and apparently my targets are neither 
 > CGI::Application nor CGI::Application::Dispatch subclasses! I just 
 > cannot fathom this, [...]

Ahhh.  I've tripped over that sharp edge before.  In public, no less.

Here's my description of what I *thought* was a problem:

  http://lists.openlib.org/pipermail/cgiapp/2008q3/000665.html

and here's me eating my words and instead suggesting a small fix to an
error message so that those of us who encounter said "sharp edge" are
given a bit of gentle guidance:

  http:/lists.openlib.org/pipermail/cgiapp/2008q3/000670.html

If you add a 'use Foo::Dispatch;' up near the top of your foo.pl
instance script, it'll run under CGI::Application::Server (although
there seems to be something goofy with the dispatch table that keeps
it from doing what it should, but at least the server part works...).

g.


More information about the cgiapp mailing list