[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cgiapp
Subject:    [Fwd: Re: [cgiapp] Problem with CGI::Application::Dispatch::Server
From:       Ron Savage <ron () savage ! net ! au>
Date:       2007-09-21 1:57:35
Message-ID: 46F3250F.5000409 () savage ! net ! au
[Download RAW message or body]



-------- Original Message --------
Subject: Re: [cgiapp] Problem with CGI::Application::Dispatch::Server V 0.52
Date: Fri, 21 Sep 2007 11:23:23 +1000
From: Ron Savage <ron@savage.net.au>
To: hartzell@alerce.com
References: 
<61508.121.219.251.149.1187927870.squirrel@mail.savage.net.au> 
<18160.28663.943641.678602@almost.alerce.com> 
<46F0A06D.8080303@savage.net.au> 
<18161.10021.445381.712317@almost.alerce.com>

George Hartzell wrote:

Hi George

> Are you using CGI::Application::Dispatch at all?

No.

> If not, then you should use CGI::Application::Server with your
> Local::Application class.

I am.

>  > After great pain trying to install Test::WWW::Mechanize (It causes Perl 
>  > to abort and the script driving the install to loop, which causes Perl 
>  > to abort, which....) I changed my demo.
> 
> This seems to be a separate issue from the above.
> Test::WWW::Mechanize isn't a prereq for
> CGI::Application::Dispatch::Server, so it's absence shouldn't have
> tanked you.
> 
> What does your test harness have to do with making a stand alone
> server work?

I was just letting you know in case it was relevant.

I hope to investigate this problem today.

>  > But now my demo causes FireFox to hang, with its 'Loading' msg and the 
>  > icon spinning. Sigh. Time to give up, again.
>  > 
>  > But thanx for replying.
> 
> Well, first, don't give up.

My demo was mistakenly using the syntax of
CGI::Application::Dispatch::Server, instead of CGI::Application::Server,
as I struggled to get started with all this.

In fact, the typo I mentioned previously is in the synopsis for
CGI::Application::Dispatch::Server:

Synopsis:
   use CGI::Application::Dispatch::Server;

   my $server = CGI::Application::Dispatch::Server->new(
              class    => 'MyClass::Dispatch' <- Missing comma.
              root_dir => '/home/project/www',
    );
   $server->run;

> Second, give us some information so that we can help.  What have you
> made work?  Can you get a very simple app to run?

Eventually it got something working. I had to overcome typos in the
synopsis for CGI::Application::Dispatch::Server:

Synopsis:

   use CGI::Application::Server;
   use MyCGIApp; <- Missing 'use'.
   use MyCGIApp::Admin; <- Missing 'use'.

   my $server = CGI::Application::Server->new();
   $server->document_root('./htdocs');
   $server->entry_points({
       '/index.cgi' => 'MyCGIApp',
       '/admin'     => 'MyCGIApp::Admin'
   });
   $server->run();

With that fix my demo works. Thanx for the help.

-- 
Ron Savage
ron@savage.net.au
http://savage.net.au/index.html


-- 
Ron Savage
ron@savage.net.au
http://savage.net.au/index.html

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/cgiapp@lists.erlbaum.net/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: cgiapp-unsubscribe@lists.erlbaum.net
For additional commands, e-mail: cgiapp-help@lists.erlbaum.net

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic