[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
realperl
I can't get realperl to work...
This is what I have defined in minivend.cfg:
UserTag realperl HasEndTag
UserTag realperl CanNest
UserTag realperl Interpolate
UserTag realperl Routine <<EOF
sub {
my $str = eval {eval $_[0] or die;};
if ($@) {return "<PRE>$@</PRE>";}
return $str;
}
EOF
In a page I have defined:
[realperl]
[include /catalogs/crs/cgi/hi-there.pl]
[/realperl]
hi-there.pl contains:
#!/usr/bin/perl
if (!open(CODE,"/catalogs/crs/cgi/hithere.pl")) {
return "Problem opening hithere.pl: $!";
}
while ($recrd.=<CODE>);
return $recrd;
Originally hi-there.pl contained a return('Hi there'); and that worked.
Execution of this code generates an eval error 1(?) on line 2.
I have had a response on previous queries to use GlobalSubs but as far
as I understand that I need to define the code in the minivend.cfg but
that is not very flexible...
What am I doing wrong?
Tia, Albert