Changeset 16617 for misc/runpugs/bin

Show
Ignore:
Timestamp:
06/02/07 20:51:51 (18 months ago)
Author:
andara
Message:

[runpugs] -Better newline handling

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • misc/runpugs/bin/test_session.pl

    r16595 r16617  
    22use strict; 
    33use warnings; 
    4 use Perl6::Say; 
    5 use lib '../lib'; 
    64use Repl; 
    75use Web::Terminal::Server::Session; 
     
    1513my $subref = sub {my $cmd=shift;my $res=$session->write($cmd);chomp $res; return ($res,$session->{'prompt'});}; 
    1614 
    17 my $prompt =$session->prompt; 
    18 my $motd =$session->output; 
     15my $prompt =$session->{'prompt'}; 
     16my $motd =$session->{'output'}; 
    1917 
    2018my $repl = new Repl {subref=>$subref,prompt=>$prompt,motd=>$motd}; 
     
    3432                ); 
    3533                #$new_session->init(); 
    36                 if ( $new_session->error == 1 ) {                
     34                if ( $new_session->{'error'} == 1 ) {            
    3735                        # Something went wrong, failed to create a new session 
    3836                        print "Something went wrong, failed to create a new session:\n"; 
    39                         print $new_session->error; 
    40                         print $new_session->output;                      
     37                        print $new_session->{'error'}; 
     38                        print $new_session->{'output'};                  
    4139                } 
    4240