develooper Front page | perl.beginners | Postings from April 2010

AW: Can't locate object method "TIEHASH" via package " Apache::Session::MySQL

Thread Previous | Thread Next
From:
Thomas Bätzler
Date:
April 19, 2010 02:23
Subject:
AW: Can't locate object method "TIEHASH" via package " Apache::Session::MySQL
Message ID:
E350C77ABFDBD242BDD51F5DA07905C104B55CBF@SONNE.gw.bringe.net
Owen <rcook@pcug.org.au> wrote:


> On Mon, 19 Apr 2010 00:14:44 +0100
> Mimi Cafe <mimicafe@googlemail.com> wrote:
> 
> > I get following error when trying to open a session using
> > Apache::Session::MySQL.
> >
> >
> >
> > Here is what I have
> >
> >
> >
> >   38   tie %session, " Apache::Session::MySQL", undef,{

There is leading whitespace in the class name " Apache::Session::MySQL".

> I really don't know, but the documentation shows;
> 
> tie %hash, 'Apache::Session::MySQL', $id, {
>     Handle     => $dbh,
>     LockHandle => $dbh
>  };
> 
> So did you try just the single quotes?

@Owen: If you "really don't know" then your suggestions are cargo cult programming. Please don't do that.

As a rule of thumb, use single quotes if you're dealing with a literal string than you don't want/need to interpolate (substitute variables, escaped characters, etc.) and use double quotes otherwise.


MfG,
Thomas Bätzler
-- 
BRINGE Informationstechnik GmbH
Zur Seeplatte 12
D-76228 Karlsruhe
Germany

Fon: +49 721 94246-0
Fon: +49 171 5438457
Fax: +49 721 94246-66
Web: http://www.bringe.de/

Geschäftsführer: Dipl.-Ing. (FH) Martin Bringe
Ust.Id: DE812936645, HRB 108943 Mannheim




Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About