On Fri, 22 Oct 2004 10:16:20 -0400, Michael wrote:
Hi Michael
Interesting discussion...
>�But I do see your point. Perhaps this would be clearer...
> sub handler ($$)
> {
> my ($self, $r) = @_;
> $r->status(OK);
> my $app = $self->�new();
> $app->run();
These last 2 lines might as well be written in a more Perlish way as:
$self -> new() -> run();
> return $r->status();
> }
While debugging I sometimes create a separate variable such as you have with $app, but
in production it is simply not needed.
You'll recall that all thru the original CGI::App docs, the author writes the same way
you do
(from the Synopsis):
### In "webapp.cgi"...
use WebApp;
my $webapp = WebApp->new();
$webapp->run();
when he should have been using:
use WebApp;
WebApp -> new() -> run();
;-))
--
Cheers
Ron Savage, [EMAIL PROTECTED] on 23/10/2004
http://savage.net.au/index.html
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/[EMAIL PROTECTED]/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]