ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/myhttpd/shell.pl
(Generate patch)

Comparing Coro/myhttpd/shell.pl (file contents):
Revision 1.11 by root, Tue Aug 14 14:56:22 2001 UTC vs.
Revision 1.12 by root, Wed Aug 15 03:06:22 2001 UTC

9use Text::Abbrev; 9use Text::Abbrev;
10 10
11my $last_ts = time; 11my $last_ts = time;
12 12
13my %complete; 13my %complete;
14my @commands = qw(quit squit refresh country restart block info eval); 14my @commands = qw(quit squit refresh country restart block info print);
15 15
16abbrev \%complete, @commands; 16abbrev \%complete, @commands;
17 17
18sub shell { 18sub shell {
19 my $fh = shift; 19 my $fh = shift;
25 print "bye bye.\n";#d# 25 print "bye bye.\n";#d#
26 last; 26 last;
27 } elsif ($cmd eq "squit") { 27 } elsif ($cmd eq "squit") {
28 Event::unloop; 28 Event::unloop;
29 last; 29 last;
30 } elsif ($cmd eq "eval") { 30 } elsif ($cmd eq "print") {
31 my @res = eval $_; 31 my @res = eval $_;
32 print $fh "eval: $@\n" if $@; 32 print $fh "eval: $@\n" if $@;
33 print $fh "RES = ", (join " : ", @res), "\n"; 33 print $fh "RES = ", (join " : ", @res), "\n";
34 } elsif ($cmd eq "block") { 34 } elsif ($cmd eq "block") {
35 print "blocked '$_'\n";#d# 35 print "blocked '$_'\n";#d#

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines