Ville Skyttä wrote:
Hi,

The script below under mod_perl 1.99_08 (ModPerl::Registry), gives me
this:

  Can't locate object method "FILENO" via package
  "Apache::RequestRec" at /usr/lib/perl5/5.8.0/IPC/Open3.pm line 196.

A real world example of a script that has these problems is the W3C
Markup Validator,
<http://dev.w3.org/cvsweb/validator/httpd/cgi-bin/check?rev=1.200.2.79>.

The validator works under mod_perl 1, and I guess the test script would
as well (I'm unable to verify that at the moment, though).  Maybe a
mod_perl 2 bug/missing feature?

My installation is Red Hat 8.0, Apache 2.0.40, mod_perl 1.99_08 and Perl
5.8.0.  The test script:

  use IPC::Open2 qw(open2);
  use IO::File ();
  my $in  = IO::File->new_tmpfile();
  my $out = IO::File->new_tmpfile();
  print $in "foobar\n";
  seek $in, 0, 0;
  print "Content-Type: text/plain\n\n";
  my $pid = open2($out, $in, 'tee');
  undef $in;
  waitpid $pid, 0;
  seek $out, 0, 0;
  while (<$out>) {
    print;
  }
  undef $out;
Please try again with the latest cvs, I've just ported FILENO, OPEN and CLOSE interfaces from 1.0. Though I doubt that this will work, IPC::Open* have always had problems with mod_perl. IPC::Run should be used instead for now. Hopefully will be able to look more into this issue much later unless someone beats me to it.

__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com

Reply via email to