perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From St├ęphane Peiry <stpe...@colt.ch>
Subject $udat initialisation
Date Wed, 04 Apr 2001 17:15:03 GMT

Hi Everybody,

Are there any known problems with $udat initialisation?

As example I have the file 'one.html' which contains the following
(Embperl code):

[-
   $hold{thing} = "Hello";
   $udat{some}  = {%hold};
-]

[+ $udat{some}{thing} +]

(I use %hold because.. I cannot initialize directly $udat as
$udat{some}{thing} = "Hello" ..  am I missing something..?)

File 'two.html' (wich I call afther one.html) contains:

[+ $udat{some}{thing} +]

Hence I would expect this last one to print out "Hello", if I
had previously made a call to 'one.html'.  But it doesnt, it
prints the following error msg:

Can't use an undefined value as a HASH reference at 
/usr/local/apache/htdocs/monitoring/two.html line 2


Anyway, if I write a third file 'three.html' wich contains
just a line more than the 'two.html':

[- $udat{blahblah} = "blahblah" -]
[+ $udat{some}{thing} +]

then it answers appropriatly "Hello" wich is what I wanted in the first 
place....
Why is it so?

Thanks for any help/infos/comments on this,
St├ęphane




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


Mime
View raw message