perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Schindl <tomAtLi...@gmx.at>
Subject Re: pnotes MP1->MP2
Date Mon, 03 Apr 2006 18:32:46 GMT
John Russell wrote:
> In MP1 it was possible to do..
> 
> Authorization Phase
> 
> sub handler {
> 
>   my $dbh;
> 
>   $dbh = DBI->connect(..)
>       || return "Error connecting.\n $DBI::errstr\n";
> 
>   $r->pnotes(DBH => $dbh);
> 
> 
> Response Phase
> 
> sub handler($$) {
> 
>   my $dbh = $r->pnotes('DBH');
> 
> However this doesn't work in MP2 because $dbh is a hash
> 

Why shouldn't that work in MP2. $dbh is not a hash it's a object
instance blessed as a hash.

This is absolutely right in MP2 and MP1!
-------------8<-------------
$r->pnotes(DBH => $dbh);
-------------8<-------------

What your trying todo in the other lines must fail!

Tom

Mime
View raw message