Hi there .......... thank you for your reply - I managed to get it fixed. Not sure its the greatest class ever but it works.

Thanks again,

G :)




From: "Mr. Shawn H. Corey" <[EMAIL PROTECTED]>
To: beginners@perl.org
Subject: Re: Can't locate object method - weirdness
Date: Wed, 07 Jun 2006 12:28:43 -0400
MIME-Version: 1.0
Received: from lists.develooper.com ([63.251.223.186]) by bay0-mc3-f14.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 7 Jun 2006 09:30:16 -0700
Received: (qmail 31150 invoked by uid 514); 7 Jun 2006 16:29:13 -0000
Received: (qmail 31141 invoked from network); 7 Jun 2006 16:29:13 -0000
Received: from x1a.develooper.com (HELO x1.develooper.com) (216.52.237.111) by lists.develooper.com with SMTP; 7 Jun 2006 16:29:13 -0000
Received: (qmail 22286 invoked by uid 225); 7 Jun 2006 16:29:12 -0000
Received: (qmail 22278 invoked by alias); 7 Jun 2006 16:29:11 -0000
Received: pass (x1.develooper.com: local policy)
Received: from mx6-6.spamtrap.magma.ca (HELO mx6-6.spamtrap.magma.ca) (209.217.78.149) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Wed, 07 Jun 2006 09:28:59 -0700 Received: from mail3.magma.ca ([10.0.10.13])by mx6-6.spamtrap.magma.ca (8.13.1/8.13.1) with ESMTP id k57GSZSV005516for <beginners@perl.org>; Wed, 7 Jun 2006 12:28:35 -0400 Received: from ottawa-hs-209-217-96-71.d-ip.magma.ca (ottawa-hs-209-217-96-71.d-ip.magma.ca [209.217.96.71])by mail3.magma.ca (Magma's Mail Server) with ESMTP id k57GSmUP021287for <beginners@perl.org>; Wed, 7 Jun 2006 12:28:49 -0400
X-Message-Info: LsUYwwHHNt3660MmjhEvYg2f34OAemlKtU9j2Z7TuGo=
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
List-Post: <mailto:beginners@perl.org>
List-Help: <mailto:[EMAIL PROTECTED]>
List-Unsubscribe: <mailto:[EMAIL PROTECTED]>
List-Subscribe: <mailto:[EMAIL PROTECTED]>
List-Id: <beginners.perl.org>
Delivered-To: mailing list beginners@perl.org
Delivered-To: beginners@perl.org
X-Spam-Status: No, hits=-2.6 required=8.0tests=BAYES_00
X-Spam-Check-By: la.mx.develooper.com
References: <[EMAIL PROTECTED]>
X-Mailer: Evolution 2.4.1 X-magma-MailScanner-Information: Magma Mailscanner Service
X-magma-MailScanner: Clean
X-Old-Spam-Status: not spam, SpamAssassin (score=-4.399, required 9,autolearn=not spam, ALL_TRUSTED, BAYES_00)
Return-Path: [EMAIL PROTECTED]
X-OriginalArrivalTime: 07 Jun 2006 16:30:17.0778 (UTC) FILETIME=[A9856920:01C68A4F]

On Wed, 2006-07-06 at 15:50 +0100, Graeme McLaren wrote:
> Hi all, I have a weird error:
>
> Can't locate object method &quot;dbh&quot; via package &quot;em_log&quot; 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>





--
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