[Zope-Perl] problem with $self
Anthony Hinsinger
Anthony.Hinsinger@univ-metz.fr
Sun, 16 Dec 2001 23:38:28 +0100
hello, i've just installed pyperl and zoperl. it works fine, and it's a
really good job !!!!! :)
but i've a problem. i've tested a simple example :
Id: test_perl
Arguments: self
Code:
my $self = shift;
my @res;
for($self->objectIds()) {
push(@res, $_);
}
return join("\n", @res);
when hit "try it", zope said :self: Provided by Zope's ZPublisher internally
and the perl code works.
but, when i tried to call this object for a dtml-document by :
<dtml-var test_perl>
it don't want to run. I've this error message :
Error Type: PerlError
Error Value: Can't call method "objectIds" on an undefined value at
test_perl line 4.
why ? it seems unable to get "self"...
does anyone can help me ?
Thanks, Anthony