perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lincoln Turner <>
Subject print STDOUT "something" and $optRedirectStdout=1 fails on 2.0b8
Date Sat, 14 Sep 2002 16:23:50 GMT

Hello all,

After a year away from Embperl (and the web in general), I'm trying to
get some old code from Embperl 1.3 up and running again. The code
assumes optRedirectStdout is true and makes lots of calls to print
statements (it's in a module).

However, while 'print OUT "hello"' works fine, when I run:

[- print "hello"; -]

I get:

 Error in Perl code: Can't locate object method "PRINT" via package
 "Apache::RequestRec" (perhaps you forgot to load
 "Apache::RequestRec"?) at /usr/local/apache2/quiz/test.epl line 4.

The code:

optRedirectStdout is [+ $optRedirectStdout +]

tells me that it is "1", so it is not a problem with setting

I could live with changing all calls to 'print OUT' but when I attempt
this from within a module that is used by the Embperl page I get:

print() on unopened filehandle Quiz::Presenter::OUT

despite what I understand to be aliasing code in
Embperl::Out. Further, if I fully qualify the filehandle I still get:

print() on unopened filehandle Embperl::OUT

Does anybody know what's going on?



School of Physics, University of Melbourne; on sabbatical at
Physics Department / n-laag G1.02    Work: (31 40) 247 4793
Technische Universiteit / Eindhoven  Fax:  (31 40) 245 6050
PO Box 513, 5600MB Eindhoven         Mobl: +31 625 575746
The Netherlands


I am running Embperl/2.0b8 Apache/2.0.40 (Unix) mod_perl/1.99_05-dev
Perl/v5.6.1 on a just-installed redhat 7.2 i386 system. My httpd.conf

LoadModule perl_module modules/
LoadModule embperl_module
PerlTaintCheck On
PerlWarn On
PerlModule Apache2
PerlModule Embperl
PerlInitHandler Apache::StatINC
Perlrequire /usr/local/apache2/conf/
Perlrequire /usr/local/apache2/quiz/lib/

AddType text/html .epl

AddHandler cgi-script .cgi

Alias /quiz/ "/usr/local/apache2/quiz/"

<Location /quiz>
  EMBPERL_APPNAME embperl_quiz
  EMBPERL_URIMATCH \.htm.?|\.epl$
  SetHandler perl-script
  PerlHandler Embperl::Object
  Options ExecCGI

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message