[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Strange things in perl version in unstable



On Sat, Dec 16, 2006 at 11:50:55AM +0100, Luk Claes wrote:
>On request of Marc, I started reviewing perl for testing migration, but I
>found a strange thing. Brendan, can you please comment:
>
>Why is $stuff used before it's declared in the below part of diff?

Oops, typo.  It's a harmless no-op, will fix for the next release.

>--- perl-5.8.8.orig/lib/perl5db.pl
>+++ perl-5.8.8/lib/perl5db.pl
>@@ -6354,9 +6354,13 @@
>         $OUT->write( join( '', @_ ) );
>
>         # Receive anything there is to receive.
>-        my $stuff;
>-        $IN->recv( $stuff, 2048 );    # XXX "what's wrong with sysread?"
>-                                      # XXX Don't know. You tell me.
>+        $stuff;
>+        my $stuff = '';
>+        my $buf;
>+        do {
>+            $IN->recv( $buf = '', 2048 );   # XXX "what's wrong with sysread?"
>+                                            # XXX Don't know. You tell me.
>+        } while length $buf and ($stuff .= $buf) !~ /\n/;
>
>         # What we got.
>         $stuff;



Reply to: