FAQ
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

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 7 of 9 | next ›
Discussion Overview
groupembperl @
categoriesmodperl, perl
postedNov 12, '03 at 1:30a
activeJan 25, '04 at 4:04a
posts9
users5
websiteperl.apache.org

People

Translate

site design / logo © 2022 Grokbase