Changeset 16595 for misc/runpugs/bin
- Timestamp:
- 06/01/07 18:08:37 (18 months ago)
- Location:
- misc/runpugs/bin
- Files:
-
- 3 modified
-
perl_repl.pl (modified) (1 diff)
-
test_session.pl (modified) (1 diff)
-
test_session_dispatcher.pl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
misc/runpugs/bin/perl_repl.pl
r16228 r16595 4 4 #use lib '../lib','/home/andara/lib/perl/5.8.8'; 5 5 use Repl; 6 6 my $prompt ='pugs> '; 7 my $motd ='Simple Perl REPL'; 7 8 my $subref = sub { 8 9 my $cmd = shift; 9 10 my $res = eval($cmd); 10 return $res;11 return ($res,$prompt); 11 12 }; 12 my $prompt ='pugs> '; 13 my $motd ='Simple Perl REPL'; 13 14 14 15 15 my $repl = new Repl {subref=>$subref,prompt=>$prompt,motd=>$motd}; -
misc/runpugs/bin/test_session.pl
r16218 r16595 13 13 my $session=create_session($app); 14 14 15 my $subref = sub {my $cmd=shift;my $res=$session->write($cmd);chomp $res; return $res;};15 my $subref = sub {my $cmd=shift;my $res=$session->write($cmd);chomp $res; return ($res,$session->{'prompt'});}; 16 16 17 17 my $prompt =$session->prompt; -
misc/runpugs/bin/test_session_dispatcher.pl
r16218 r16595 7 7 use Web::Terminal::Dispatcher; 8 8 $Web::Terminal::Settings::port=2059; 9 10 my $app=(defined $ARGV[0])?$ARGV[0]:2; 9 my $app; 10 if (defined $ARGV[0]){ 11 $app=$ARGV[0]; 12 } else { 13 die "Usage: $0 app (0|1|2) [id (default 42)].\n"; 14 } 11 15 my $id=(defined $ARGV[1])?$ARGV[1]:42; 12 16 $id='testsession'.$id; … … 17 21 (my $reply,my $prompt,my $histref) = 18 22 &Web::Terminal::Dispatcher::send($id,$ip,$app,1,$cmd); 19 return $reply;23 return ($reply,$prompt); 20 24 }; 21 25
