Re: mod_perl, mod_gzip and connection->fileno

[prev] [thread] [next] [Date index for 2005/02/19]

From: Stas Bekman
Subject: Re: mod_perl, mod_gzip and connection->fileno
Date: 04:18 on 19 Feb 2005
Marcel Greter wrote:
> Stas Bekman schrieb:
> 
>>>    ... my $fileno = $connection->fileno(0);
>>>    vec(my $rin = '', $fileno, 1) = 1;
>>>    select(my $rout = $rin, undef, undef, 0);
>>
>>
>>
>> Is this better that IO::Select in [2]?
>>
> It should do the same thing. IMHO IO::Select is just a frontend for the 
> core select function, so you don't need to fiddle with vec yourself. One 
> can save some memory (504 KB here) if you use the core select function 
> directly and don't load IO::Select, which is always a good thing.

How about we keep the original code using IO::Select and provide an 
example how to do it more efficiently? The IO::Select example is much more 
userfriendly :)

>> Also take a look at: 
>> http://perl.apache.org/docs/1.0/guide/debug.html#Handling_the__User_pressed_Stop_button__case 
>>
>> It's directly related and should probably be merged into one item. or 
>> at least xref each other.
>>
> I'm checking the return value of each print, so this should take care of 
> this case.

Wow! But most people don't. So in mp2 you no longer need to do that, as 
print() as well as all other IO methods croak on failure.

So could you please adjust whatever needs to be adjusted in that section, 
and post here a patch to the POD source (or the section itself), while 
adding the discussion why one should use 0 and not 1, based on this thread?

Thanks Marcel.

        -- 
        __________________________________________________________________
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

(message missing)

mod_perl, mod_gzip and connection->fileno
Marcel Greter 22:11 on 18 Feb 2005

Re: mod_perl, mod_gzip and connection->fileno
Stas Bekman 00:58 on 19 Feb 2005

Re: mod_perl, mod_gzip and connection->fileno
Marcel Greter 04:14 on 19 Feb 2005

Re: mod_perl, mod_gzip and connection->fileno
Stas Bekman 04:18 on 19 Feb 2005

Re: mod_perl, mod_gzip and connection->fileno
Marcel Greter 04:41 on 19 Feb 2005

Re: mod_perl, mod_gzip and connection->fileno
Stas Bekman 05:12 on 19 Feb 2005

Re: mod_perl, mod_gzip and connection->fileno
Geoffrey Young 20:13 on 24 Feb 2005

Re: mod_perl, mod_gzip and connection->fileno
Geoffrey Young 14:43 on 24 Feb 2005

Generated at 22:43 on 24 Feb 2005 by mariachi v0.52