come to think of it, having the 'use' statement:

package QHB::Public;
use QHB::Public;

in your .cgi file might be confusing perl, since you are currently IN that package. 
Why would you want to set that package within
your CGI?

-Stephen

-----Original Message-----
From: Mark Stosberg [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 27, 2001 03:42 PM
To: [EMAIL PROTECTED]
Subject: [cgiapp] need help with "can't locate method 'new'" error



Hello!

I'm setting up the trick where I create my own super class, that other
modules interit from, but I'm running into an error which I bet will be
"obvious" to one of you. Here's what I think is essentional the bug:

#### QHB.pm
package QHB;
use base 'CGI::Application';

#### QHB::Public.pm
package QHB::Public;
use base qw(QHB);

#### qhb.cgi
package QHB::Public;
use QHB::Public;
my $app = QHB::Public->new();
$app->run;


# what happens:
> ./qhb.cgi
Can't locate object method "new" via package "QHB::Public" at ./qhb.cgi
line 18.

####

What am I missing? I'm expecting new() and other methods to trickle down
from CGI::App
to QHB to QHB::Public to qhb.cgi.

Thanks,

  -mark

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to