If $p is a ref to a tied hash then the problem is probably DBD::mysql not
calling the 'get magic' to trigger the actual FETCH from the hash.

Tim.

On Wed, Dec 12, 2001 at 11:52:49AM -0500, Rudy Lippan wrote:
> > 
> > I am not sure it is DBI problem or CGI problem.
> > After looking the document of CGI::Vars,
> > 
> 
> I did a quick test, and it looks like a  DBD::mysql issue.  
> 
> 
> Output using DBD::Pg
> 
> REF:HASH(0x82a3518):
> DEFREF:foo:
> QUOTE:'foo':
> 
> 
> And when using DBD::mysql:
> 
> REF:HASH(0x823ae28):
> DEFREF:foo:
> QUOTE:NULL:
> 
> 
> And the code:
> use strict;
> use warnings;
> use DBI;
> use CGI;
> 
> my $dbh = DBI->connect("dbi:Pg:dbname=rlippan","","");
> my $cgi = new CGI;
> 
> $cgi->param('abc' => 'foo');
> 
> my $p = $cgi->Vars;
> print "REF:".$p.":";
> print "DEFREF:".$p->{'abc'}.":";
> print "QUOTE:".$dbh->quote($p->{'abc'}).":";
> 
> $dbh->disconnect;
> 
> 
> 
> -Rudy
> 

Reply via email to