Re: read not sysread?

[prev] [thread] [next] [Date index for 2004/11/17]

From: Stas Bekman
Subject: Re: read not sysread?
Date: 21:51 on 17 Nov 2004
Sean T Allen wrote:
> using 1.99_17...
> 
> moved code to a new machine that i built as compared to a pre-existing 
> machine running... 1.99_07-dev
> 
> i have a stripped down CGI reading routine...
> 
>        eval ( "sysread( \STDIN, \$input, $ENV{ 'CONTENT_LENGTH' } )" );

CGI.pm uses read, not sysread. Where did you find sysread in it? Which 
version are you using. (and in the future please follow the guidelines on 
problems report: http://perl.apache.org/bugs/ so we don't have to ask the 
same questions again and again)

> doesnt read anything
> 
> but
> 
>            read( STDIN, $input, $ENV{ 'CONTENT_LENGTH' } );
> 
> does
> 
> there is a warning in the error log for the line that the eval is on:
> 
> Unrecognized escape \S passed through at /ai/toppik/lib/Infant/CGI.pm 
> line 484.
> 
> any quick help on fixing this problem is appreciated. or actually just 
> an explaination...

under mod_perl STDIN is tied *only* if run under 'perl-script'
http://perl.apache.org/docs/2.0/user/config/config.html#C_perl_script_
and then you can read() from it.

perl's tie interface doesn't support SYSREAD (see perltie.pod), so you 
can't use sysread under mod_perl.

        -- 
        __________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@xxxxxx.xxx http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

read not sysread?
Sean T Allen 18:15 on 17 Nov 2004

Re: read not sysread?
Stas Bekman 21:51 on 17 Nov 2004

Generated at 11:26 on 21 Dec 2004 by mariachi v0.52