perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anthony Gardner <cyclewood_...@yahoo.co.uk>
Subject Sth I don't understand about pnotes
Date Fri, 16 Sep 2005 10:08:25 GMT
Can s.o. explain what is wrong with the following code
....

$r->pnotes('KEY' => push( @{ $ar }, $some_val ) );

because, when it comes to getting the value from
pnotes later with .... $r->pnotes(KEY), it returns the
number of elements in the array and not the array ref.

I've had to write ......

my $ar = $r->pnotes('KEY') || [];
push( @{ $ar }, $debug_str );
$r->pnotes( 'KEY' => $ar );


Apache/1.3.33, mod_perl/1.29 


CIA


-Anthony



		
___________________________________________________________ 
To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre.
http://uk.security.yahoo.com

Mime
View raw message