[Zope] PerlMethod invocation
Ulrich Wisser
u.wisser@publisher.de
Tue, 13 Feb 2001 12:25:19 +0100
Hello,
one of my PerlMethods returns a array ref. Another
PerlMethod tries to get this ref and construct
a select form from the data. Please find my code
below.
When I try to get the array with
$self->reportlist($self) I get a Zope error
Error Type: PerlError
Error Value: Undefined subroutine &Zope::_recompile called at
/usr/local/Zope-2.2.5-linux2-x86/lib/perl/Zope.pm line 98.
What do I do wrong?
(Zope 2.2.5, Linux, perl 5.6.1-TRIAL1, zoperl-1.0beta3, pyperl-1.0beta3)
Thanks
Ulrich
PerlMethods:
id: reportliste
arguments:
code:
my @reports = (
[0, 'Übersicht', '/report/overview'],
[1, 'Statistik', '/report/history'],
[2, 'Alle Seiten', '/report/pages'],
[3, 'Seiten mit IVW', '/report/ivw'],
[4, 'Seiten ohne IVW', '/report/noivw'],
[5, 'Angemeldete Seiten', '/report/submitted'],
[6, 'Seiten mit Zugriffsfehler', '/report/httperror'],
[7, 'Broken Links', '/report/brokenlinks'],
[8, 'Seiten ohne Link', '/report/deadlink'],
[9, 'Header', '/report/header']
);
return \@reports;
id: chooseReport
arguments: self
code:
my $report = shift;
my $res;
my $reports = $self->reportliste($self);
$res = '<select name="report">';
foreach my $r (@$reports) {
$res .= '<option value="'. $r->[0] .'"';
$res .= 'selected' if ($r->[0] == $report);
$res .= '>' . $r->[1];
}
$res .= '</select>';
return $res;
--
Searchengine Know How - Webpromotion - Optimization - Internal Search
World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg
http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06