perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kee Hinckley <naz...@somewhere.com>
Subject Re: DBIx::Recordset struggles to pass tests
Date Sat, 24 Jan 2004 06:35:02 GMT
Okay, I know what the problem is, but I don't know what to do about it.

tied hashes may not return typeglobs.

$Page = $this->Commons->listArticles({
     '$fields'   => 'id,dtm,summary,title,field1,field2,content,contenttype',
     id          => $fdat{_preview}
  });

my $obj = tied(%$Page);
my $rec = $obj->{'*Recordset'}-> Curr();
$rec = tied(%$rec);

# we now have the DBIx::Recordset::Row that would have gotten used
# by $Page->{-keyword};

$key = $rec->FETCH('-keyword');

# that will return the typeglob *DBIx::Recordset::newself
# this will crash with "Can't upgrade that kind of scalar"
$key = $Page->{'-keyword'};

But both call the same code.

I can't change all my code to deal with this.  It looks to me like a 
Perl bug.  Any ideas?
-- 
Kee Hinckley
http://www.messagefire.com/         Next Generation Spam Defense
http://commons.somewhere.com/buzz/  Writings on Technology and Society

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message