IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 23375


Ignore:
Timestamp:
Mar 17, 2009, 4:42:25 PM (17 years ago)
Author:
jhoblitt
Message:

argh!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous/scripts/ptest.pl

    r23146 r23375  
    5353
    5454while ($kids) {
    55 #    foreach my $child ($s->can_read(0)) {
    56 #        my $string = do { local $/; <$child>};
    57 #        my @events = split(/\n/, $string) if $string;
    58 #        print join("\n", @events), "\n" if scalar @events;
    59 #    }
     55    foreach my $child ($s->can_read(0)) {
     56        my $string = do { local $/; <$child>};
     57        my @events = split(/\n/, $string) if $string;
     58        print join("\n", @events), "\n" if scalar @events;
     59    }
    6060}
    6161
     
    6464    my ($sock, $id) = @_;
    6565
    66     unless ($print_stdout) {
    67         my $filename = hostname() . "." . $$ . ".txt";
    68         open my $fh, ">$filename" or die "can't open $filename: $!";
    69 
    70         open STDOUT, ">&", $fh or die "can't reopen STDOUT: $!";
    71         autoflush STDOUT 1;
    72     }
     66#    unless ($print_stdout) {
     67#        my $filename = hostname() . "." . $$ . ".txt";
     68#        open my $fh, ">$filename" or die "can't open $filename: $!";
     69#
     70#        open STDOUT, ">&", $fh or die "can't reopen STDOUT: $!";
     71#        autoflush STDOUT 1;
     72#    }
    7373
    7474#    select $sock;
     
    8181#    proxy   => 'http://localhost:80/nebulous'
    8282        proxy   => 'http://alala:80/nebulous',
    83 #        sock    => \*STDOUT,
     83        sock    => $sock,
    8484    );
    8585
     
    123123use base qw( Nebulous::Client );
    124124
    125 #sub new
    126 #{
    127 #    my $class = shift;
    128 #    my %p = @_;
    129 #
    130 #    my $sock = delete $p{sock};
    131 #    my $self = $class->SUPER::new(%p);
    132 #    $self->{sock} = $sock;
    133 #
    134 #    return $self;
    135 #}
     125sub new
     126{
     127    my $class = shift;
     128    my %p = @_;
     129
     130    my $sock = delete $p{sock};
     131    my $self = $class->SUPER::new(%p);
     132    $self->{sock} = $sock;
     133
     134    return $self;
     135}
    136136
    137137BEGIN {
Note: See TracChangeset for help on using the changeset viewer.