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:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Reply via email to