On Wed, 2006-07-06 at 15:50 +0100, Graeme McLaren wrote:
> Hi all, I have a weird error:
> 
> Can't locate object method "dbh" via package "em_log" at 
> /path/log.cgi line 15.
> 
> 
> line 15 is the second of these two lines:
> 
> my $log = em_log->new;
> $log->dbh($dbh);
> 
> 
> in my class I have:
> 
> sub dbh{
>     my $self = shift;
>     my $dbh  = shift;
> 
>     $self->{_dbh} = $dbh if defined($dbh);
>     return $self->{_dbh};
> }
> 
> 
> so why is it saying it can't find it?

The only thing I can think of is that you may have another package
statement in your code. Try `grep -nw package <your_script>` and see.

> 
> 
> Also on a side issue the HTML isn't being interpreted by the browser, I've 
> set the content type to be text/html - so don't understand that one either.

Some web servers are set up so that any extension that is not *.html is
text and override the Content-type. Check with your web server
administrator.


-- 
__END__

Just my 0.00000002 million dollars worth,
   --- Shawn

"For the things we have to learn before we can do them, we learn by doing them."
  Aristotle

* Perl tutorials at http://perlmonks.org/?node=Tutorials
* A searchable perldoc is at http://perldoc.perl.org/



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to