Changeset 14733 for misc/runpugs
- Timestamp:
- 11/13/06 11:07:04 (2 years ago)
- Location:
- misc/runpugs
- Files:
-
- 2 added
- 1 removed
- 11 modified
-
cgi-bin/runpugs (modified) (3 diffs)
-
cgi-bin/runpugs2 (modified) (7 diffs)
-
data/runpugs.html (modified) (1 diff)
-
data/runpugs2.html (modified) (5 diffs)
-
data/runpugs2s.html (added)
-
htdocs/index.html (modified) (3 diffs)
-
htdocs/runpugs.css (modified) (4 diffs)
-
lib/Web/Terminal.pod (added)
-
lib/Web/Terminal/Dispatcher.pm (modified) (1 diff)
-
lib/Web/Terminal/Msg.pm (modified) (1 diff)
-
lib/Web/Terminal/Server.pm (modified) (7 diffs)
-
lib/Web/Terminal/Server/Session.pm (modified) (7 diffs)
-
lib/Web/Terminal/Server/Terminal.pm (deleted)
-
lib/Web/Terminal/Settings.pm (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
misc/runpugs/cgi-bin/runpugs
r14512 r14733 38 38 39 39 my $sessionid=$query->param("sessionid"); 40 40 my $motd=""; 41 41 if (not $sessionid) { 42 42 my $nid=crypt(rand(),'WV'); … … 45 45 my $now=time()-1159056000; # 36 year, 275 days offset 46 46 $sessionid=$nid.$now; 47 48 $motd=' 49 <p class="warning">Please test the <em>development version</em> of <tt>runpugs</tt>: try the <a 50 href="http://feather.perl6.nl:8080/cgi-bin/runpugs2">interactive session</a> 51 with <em>command history</em> or <a 52 href="http://feather.perl6.nl:8080/cgi-bin/runpugs2?ia=0">run a full Perl 6 script</a>.</p> 53 '; 47 54 } 48 55 … … 130 137 while(<HTML>) { 131 138 s/_TESTING_/$testing/; 139 /_MOTD_/ && do { 140 $html.=$motd; 141 next; 142 }; 132 143 s/_DEV_/$devc/; 133 144 s/_REL_/$relc/; -
misc/runpugs/cgi-bin/runpugs2
r14512 r14733 63 63 #} 64 64 my $prompt=$Web::Terminal::Settings::prompt; 65 my $allinone=1; 65 66 ######### MAIN SITEMANAGER PROGRAM ################### 66 67 67 68 if ( $query->param()) { # an action has been chosen 68 my $cmd=$query->param("cmdline"); 69 70 my $cmd=''; 71 if ($allinone==1) { 72 $cmd=$query->param("cmd"); 73 my @cmdlines=split("\n",$cmd); 74 for my $cmdline (reverse @cmdlines) { 75 $cmdline=~/^\s*$/ && next; 76 $cmdline=~/$Web::Terminal::Settings::prompt_pattern/ 77 && do { 78 $cmd=$cmdline; 79 $cmd=~s/$Web::Terminal::Settings::prompt_pattern//; 80 chomp $cmd; 81 last; 82 }; 83 } 84 } else { 85 $cmd=$query->param("cmdline"); 86 } 69 87 my $action = $query->param("action")||'runpugs'; 70 88 if ($action =~ /^(\w+)$/) { … … 104 122 $relc=''; 105 123 } 106 my $ia=$query->param('ia')||0; 124 my $ia=$query->param('ia'); 125 if (not defined $ia) {$ia=1} 107 126 my $interactive=$ia*1; 108 127 my $html=''; … … 110 129 my $clear=0; 111 130 my $nprompt=$query->param('prompt')||$prompt; 112 my $preply=''; 113 if($ query->param('output')) {131 my $preply=''; 132 if($allinone==0 and $query->param('output')) { 114 133 $preply=$query->param('output'); 134 } elsif ($allinone==1 and $query->param('cmd')) { 135 $preply=$query->param('cmd'); 115 136 } 116 137 my $reply=$Web::Terminal::Settings::prompt; … … 151 172 } 152 173 } 153 # my $promptw=HTML::Entities::encode_entities($prompt);154 174 my $npromptw=HTML::Entities::encode_entities($nprompt); 155 # my $prevcmdw=HTML::Entities::encode_entities($prevcmd);156 # my $preplyw=HTML::Entities::encode_entities($preply);157 158 #my $replyw=HTML::Entities::encode_entities("$preplyw\n$promptw$prevcmdw\n$reply");159 175 my $replyw="$preply$prompt$prevcmd\n$reply"; 160 # $prompt=$nprompt; 176 if($allinone==1){ 177 $replyw="$preply\n$reply"; 178 } 161 179 if($clear==1) { 162 180 $replyw=''; … … 171 189 $historylist.='<option value="'.$entryw.'">'.$entryw.'</option>'."\n"; 172 190 } 191 if ($allinone==1) { 192 $replyw.=$nprompt; 193 } 173 194 open(HTML,"<../data/runpugs2.html"); 174 195 while(<HTML>) { … … 177 198 next; 178 199 }; 200 /_SKIPT_/ && ($allinone==1) && next; 201 /_SKIPC_/ && ($allinone==0) && next; 179 202 s/_DEV_/$devc/; 180 203 s/_REL_/$relc/; … … 203 226 }; 204 227 =cut 205 /_REPLYW_/ && do { 228 (/_REPLYW_/ && ($allinone==0))|| 229 (/_ALL_/ && ($allinone==1)) 230 and do { 206 231 chomp $html; 207 232 $html.=$replyw; 208 233 next; 209 234 }; 210 /_NPROMPTW_/ && do {235 /_NPROMPTW_/ && ($allinone==0) && do { 211 236 chomp $html; 212 237 $html.=$npromptw; -
misc/runpugs/data/runpugs.html
r14512 r14733 27 27 <div id="mainwindow"> 28 28 <h1>Run Perl 6 now -- in your browser!</h1> 29 <p>This live web terminal runs the <a href="http://www.pugscode.org">pugs</a> interpreter for <a30 href="http://dev.perl.org/perl 6/">Perl 6</a>. For more details, read the <a31 href="http://feather.perl6.nl/~andara/runpugs/">info page</a>.32 </p>33 <p>By default, the Pugs session will use the <a34 href="http://search.cpan.org/search?query=perl6%3A%3Apugs&mode=module">latest35 release</a>. To use the latest development snapshot, change the setting36 below.</p>37 29 38 30 <form id="term" name="terminal" action="/cgi-bin/runpugs" method="POST"> 39 40 31 <input type="hidden" name="testing" value="_TESTING_"> 41 32 <input type="hidden" name="sessionid" value=""> 42 33 <input type="hidden" name="action" value="runpugs"> 43 <!--<fieldset>--> 34 <h2>Interactive Pugs Session</h2> 35 <!-- _MOTD_ --> 44 36 <input type="radio" id="rel" value="0" name="reldev" _REL_ ><label 45 for="rel">Release</label> 46 <input type="radio" id="dev" value="1" name="reldev" _DEV_ ><label for="dev">Development</label> 47 <!--</fieldset>--> 48 <h2>Interactive Pugs Session</h2> 49 <!--<textarea id="history" name="history" rows="1" cols="1" 50 style="overflow: hidden; border: 0px; width: 0px; 51 font-size:0px">_CMD_</textarea>--> 52 <!--<label for="cmd">Interactive Pugs Session<br>--> 53 <textarea id="cmd" name="cmd" rows="24" cols="80" wrap="virtual" onKeyPress="return submitenter(this,event)"> 37 for="rel">Release version</label> 38 <input type="radio" id="dev" value="1" name="reldev" _DEV_ ><label 39 for="dev">Development version</label> 40 <div id="termwindow"> 41 <textarea id="cmd" name="cmd" rows="23" cols="80" wrap="virtual" onKeyPress="return submitenter(this,event)"> 54 42 pugs> 55 43 </textarea> 56 <!--</label>--> 57 <br> 44 </div> 58 45 <input id="enter" type="submit" value="Submit"> 59 46 </form> 60 47 <script language="JavaScript"> 61 48 document.terminal.enter.style.display='none'; 62 document.terminal.cmd.focus() 49 document.terminal.cmd.focus(); 50 document.terminal.cmd.scrollTop =document.terminal.cmd.scrollHeight; 63 51 </script> 52 <p>This live web terminal runs the <a href="http://www.pugscode.org">Pugs</a> interpreter for <a 53 href="http://dev.perl.org/perl 6/">Perl 6</a>. Please <a 54 href="http://feather.perl6.nl/~andara/runpugs/">read the documentation</a>. 55 </p> 64 56 <p class="copyright">© Copyright 2006 by Wim Vanderbauwhede</p> 65 57 </div> -
misc/runpugs/data/runpugs2.html
r14512 r14733 25 25 function select_enter() 26 26 { 27 /* _SKIPC_ 27 28 document.terminal.cmdline.value=document.terminal.hist.options[document.terminal.hist.selectedIndex].value; 28 29 document.terminal.hist.selectedIndex=0; 29 30 document.terminal.cmdline.focus(); 31 _SKIPC_ */ 32 /* _SKIPT_ 33 document.terminal.cmd.value+=document.terminal.hist.options[document.terminal.hist.selectedIndex].value; 34 document.terminal.hist.selectedIndex=0; 35 document.terminal.cmd.focus(); 36 _SKIPT_ */ 30 37 } 31 38 … … 50 57 <div id="mainwindow"> 51 58 <h1>Run Perl 6 now -- in your browser!</h1> 59 <!-- 52 60 <p>This live web terminal runs the <a href="http://www.pugscode.org">pugs</a> interpreter for <a 53 href="http://dev.perl.org/perl 6/">Perl 6</a>. For more details, read the <a54 href="http://feather.perl6.nl/~andara/runpugs/"> info page</a>.61 href="http://dev.perl.org/perl 6/">Perl 6</a>. Please <a 62 href="http://feather.perl6.nl/~andara/runpugs/">read the documentation</a>. 55 63 </p> 56 <p>By default, the Pugs session will use the <a 57 href="http://search.cpan.org/search?query=perl6%3A%3Apugs&mode=module">latest 58 release</a>. To use the latest development snapshot, change the setting 59 below.</p> 60 64 --> 61 65 <form id="term" name="terminal" action="/cgi-bin/runpugs2" method="POST"> 62 66 <input type="hidden" name="prompt" value="_PROMPTW_"> … … 65 69 <input type="hidden" name="action" value="runpugs"> 66 70 <input type="radio" id="rel" value="0" name="reldev" _REL_ ><label 67 for="rel">Release</label> 68 <input type="radio" id="dev" value="1" name="reldev" _DEV_ ><label for="dev">Development</label> 71 for="rel">Release version</label> 72 <input type="radio" id="dev" value="1" name="reldev" _DEV_ ><label 73 for="dev">Development version</label> 74 <!-- 69 75 <br><br> 70 76 <span class="tabon">Interactive Pugs Session</span> 71 77 <a class="taboff" href="/cgi-bin/runpugs2?ia=0">Run a Perl 6 Script</a> 78 --> 72 79 <div id="termwindow"> 73 80 <select name="history" id="hist" onChange="select_enter()"> … … 76 83 </select> 77 84 <br> 85 <!-- _SKIPT_ 86 <textarea id="cmd" name="cmd" rows="20" cols="80" wrap="virtual" 87 onKeyPress="return submitenter(this,event)"> 88 _ALL_ 89 </textarea> 90 _SKIPT_ --> 91 <!--_SKIPC_ 78 92 <textarea readonly id="output" name="output" rows="_NROWS_" cols="80" wrap="virtual"> 79 93 _REPLYW_ … … 86 100 onKeyPress="return submitenter(this,event)"> 87 101 </label> 102 _SKIPC_ --> 88 103 </div> 89 <br>90 104 <input id="enter" type="submit" value="Submit"> 91 105 </form> 92 106 <script language="JavaScript"> 93 107 document.terminal.enter.style.display='none'; 94 document.terminal.cmdline.focus() 95 document.terminal.output.scrollTop =document.terminal.output.scrollHeight; 96 if (document.terminal.output.rows==1) { 108 document.terminal.cmdline.focus() // _SKIPT_ 109 document.terminal.cmd.focus() // _SKIPC_ 110 document.terminal.output.scrollTop =document.terminal.output.scrollHeight; // _SKIPT_ 111 document.terminal.cmd.scrollTop =document.terminal.cmd.scrollHeight; // _SKIPC_ 112 //if (document.terminal.output.rows==1) { 97 113 //document.terminal.output.style.height="2ex"; 98 }114 //} 99 115 </script> 116 <p>This live web terminal runs the <a href="http://www.pugscode.org">pugs</a> interpreter for <a 117 href="http://dev.perl.org/perl 6/">Perl 6</a>. Please <a 118 href="http://feather.perl6.nl/~andara/runpugs/">read the documentation</a>. 119 </p> 100 120 <p class="copyright">© Copyright 2006 by Wim Vanderbauwhede</p> 101 121 </div> -
misc/runpugs/htdocs/index.html
r14449 r14733 12 12 13 13 <p>Welcome to <tt>runpugs</tt>, a web terminal for <a href="http://www.pugscode.org">pugs</a>. Pugs is an implementation of <a href="http://dev.perl.org/perl6/">Perl 6</a> which aims to implement the full Perl 6 specification.</p> 14 <p><tt>runpugs</tt> currently lives <a 15 href="http://feather.perl6.nl:8080/cgi-bin/runpugs">here</a>.</p> 16 <p><em>Instructions:</em> <tt>runpugs</tt> presents the pugs interactive shell. Only 17 the line typed at the last prompt is sent to pugs. Type <code>:h</code> or 18 <code>help</code> for 19 help, <code>:q</code> (or <code>quit</code> or <code>bye</code>) to quit. 20 <br><em>Please</em> be considerate and do <em>quit</em> your 21 pugs session before you close the browser window.<br>Type <code>clear</code> to clear the web terminal (this command is not sent to pugs).</p> 14 <p><tt>runpugs</tt> lives at <a 15 href="http://run.pugscode.org">run.pugscode.org</a>.</p> 16 <p>By default, the Pugs session will use the <a 17 href="http://search.cpan.org/search?query=perl6%3A%3Apugs">latest 18 release</a>. You can try the latest development snapshot of Pugs by selecting the 'Development' radio button.</p> 19 <p>Don't hesitate to test the <em>development version</em> of 20 <tt>runpugs</tt>:</p><ul><li>try the <a 21 href="http://feather.perl6.nl:8080/cgi-bin/runpugs2">interactive session</a> 22 with <em>command history</em></li> <li>or <a 23 href="http://feather.perl6.nl:8080/cgi-bin/runpugs2?ia=0">run a full Perl 6 24 script</a> in <em>non-interactive</em> mode.</li></ul> 25 26 <h2>Instructions</h2> 27 <p><tt>runpugs</tt> presents the pugs interactive shell. Only 28 the line typed at the last prompt is sent to pugs.</p> 29 <p><tt>runpugs</tt>-specific commands:</p> 30 <dl> 31 <dt><code>help</code></dt><dd> displays the Pugs shell help (same as 32 <code>:h</code>)</dd><br> 33 <dt><code>clear</code></dt><dd>clears the web terminal (this command is not sent to the 34 pugs shell).</dd><br> 35 <dt><code>quit</code>, <code>bye</code></dt><dd>quit the Pugs session (same as 36 <code>:q</code>)</dd><br> 37 </dl> 38 <p>Please be considerate and do <em>quit</em> your 39 pugs session before you close the browser window. 40 </p> 41 <h2>Restrictions</h2> 22 42 <p>Because this is a web terminal, a number of restrictions apply:</p> 23 43 24 44 <ul> 25 <li> <Thecode>pugs</code> shell runs in <em>safe mode</em>, so system-related calls are disabled.</li>45 <li>The <code>pugs</code> shell runs in <em>safe mode</em>, so system-related calls are disabled.</li> 26 46 <li>If a call takes too long, the <code>pugs</code> session will time out.</li> 47 <li>If a call produces too much output, the <code>pugs</code> session will 48 abort.</li> 27 49 <li>If left idle for too long, the <code>pugs</code> session will time out.</li> 28 50 <li>The total number of sessions and number of sessions from a given IP address are limited.</li> … … 31 53 <p>The current values relating to the above restrictions are:</p> 32 54 <ul> 33 <li>Maximum number of lines of output: 250</li>34 55 <li>Inactivity time-out: 10 minutes</li> 35 56 <li>"Long" call time-out: 10 seconds</li> 57 <li>Maximum number of lines of output: 250</li> 58 <li>Maximum number of characters perl line of output: 250</li> 59 <li>Sessions per IP: 10</li> 36 60 <li>Total number of sessions: 50</li> 37 <li>Sessions per IP: 10</li>38 61 <li>Available memory: 64M.</li> 39 62 </ul> 40 <p>All of these are open to change if they would prove to be too restrictive.</p> 63 <p>All of these are open to change if they would prove to be too 64 restrictive.</p> 65 <h2>Known issues</h2> 41 66 <p><tt>runpugs</tt> is a very young project, and there will certainly be some bugs. Some known issues are:</p> 42 67 <ul> … … 44 69 <li>There is no command history.</li> 45 70 </ul> 71 <h2>Source</h2> 46 72 <p>You can find the source code for <tt>runpugs</tt> (in Perl 5) in the <a 47 73 href="http://svn.openfoundry.org/pugs/">pugs subversion repository</a> under -
misc/runpugs/htdocs/runpugs.css
r14512 r14733 8 8 } 9 9 H2 { font-weight: bold; font-size: 12pt} 10 11 EM {font-weight: bold; 12 font-style: normal; 13 text-decoration:none;} 14 TT {color: #204a87; 15 font-weight: bold; 16 } 17 10 18 LABEL {font-weight: normal; } 11 19 FIELDSET {border: solid white 0px}; 12 LEGEND {font-weight:bold; text-align: center; } 20 LEGEND {font-weight:normal; text-align: left; } 21 22 DL { 23 } 24 25 DT { 26 display:block; 27 float: left; 28 width: 10ex; 29 } 30 31 DD { 32 display:block ; 33 float: left; 34 } 35 13 36 .copyright {font-size: 9pt} 14 37 .warning { … … 16 39 padding: 5px; 17 40 } 18 .tabon 19 { 41 .tabon { 20 42 font-weight:bold; 21 43 background-color: #f2f2f0; … … 107 129 } 108 130 #cmd { 131 width: 100%; 109 132 font-family: "Andale Mono", courier, fixed, monospace; 110 133 font-size: 11pt; … … 113 136 color: #204a87; 114 137 background-color: #f2f2f0; 115 border: solid 2px #204a87; 116 padding: 5px; 138 border: solid 0px #f2f2f0; 139 /* border: solid 2px #204a87; 140 padding: 5px;*/ 117 141 } 118 142 /* Linkdefinities */ -
misc/runpugs/lib/Web/Terminal/Dispatcher.pm
r14512 r14733 92 92 } 93 93 } 94 95 __END__ 96 97 =head1 NAME 98 99 Web::Terminal::Dispatcher -- Dispatches commands to a terminal 100 session 101 Requires YAML::Syck. 102 103 =head1 SYNOPSIS 104 105 use Web::Terminal::Dispatcher; 106 use Web::Terminal::Settings; 107 108 ($reply, $prompt, $histref) = 109 &Web::Terminal::Dispatcher::send($sessionid,$ip,$version,$interactive,$cmd); 110 111 =head1 DESCRIPTION 112 113 This module exports a single subroutine C<send>. The arguments are: 114 $sessionid: a string identifying the session 115 $ip: the IP address of the client as a dotted-decimal string 116 $version: an integer indicating the version of the terminal application to 117 be used. The value is the index in the list of C<commands> (see L<Settings.pm>). 118 $interactive: if 1, the session is interactive, else it's batch mode 119 $cmd: the actual command to be sent to the terminal application. 120 121 The call to C<send> returns a list containing: 122 $reply: a string containing the reply from the terminal application 123 $prompt: a string containing the prompt from the terminal application 124 $histref: a reference to a list of the most recent commands (see 125 Settings.pm) 126 127 =head1 SEE ALSO 128 129 L<Web::Terminal::Settings>, 130 L<Web::Terminal::Server>, 131 L<Web::Terminal::Server::Session>, 132 L<Web::Terminal::Msg> 133 134 =head1 AUTHOR 135 136 Wim Vanderbauwhede <wim.vanderbauwhede@gmail.com> 137 138 =head1 COPYRIGHT 139 140 Copyright (c) 2006. Wim Vanderbauwhede. All rights reserved. 141 142 This program is free software; you can redistribute it and/or modify 143 it under the same terms as Perl itself. 144 145 See L<http://www.perl.com/perl/misc/Artistic.html> 146 147 =cut -
misc/runpugs/lib/Web/Terminal/Msg.pm
r14430 r14733 324 324 __END__ 325 325 326 COPYRIGHT 1997 Sriram Srinivasan 327 328 http://search.cpan.org/src/SRIRAM/examples/Networking/Msg.pm 326 =head1 NAME 327 328 Web::Terminal::Msg -- Client/Server messaging framework 329 330 =head1 SYNOPSIS 331 332 use Web::Terminal::Msg; 333 # in Dispatcher: 334 $conn = Web::Terminal::Msg->connect( $host, $port, \&rcvd_msg_from_server ); 335 # in Server: 336 Web::Terminal::Msg->new_server( $host, $port, \&login_proc ); 337 Web::Terminal::Msg->event_loop(); 338 339 =head1 AUTHORS 340 341 Sriram Srinivasan created Msg.pm for his excellent book "Advanced Perl Programming"; 342 Wim Vanderbauwhede made some minor modifications to incorporate it in 343 Web::Terminal. 344 345 =head1 COPYRIGHT 346 347 Copyright (c) 1997 Sriram Srinivasan. All rights reserved. 348 Copyright (c) 2006 Wim Vanderbauwhede <wim.vanderbauwhede@gmail.com>. All 349 rights reserved. 350 351 L<http://search.cpan.org/src/SRIRAM/examples/Networking/Msg.pm> 352 353 This program is free software; you can redistribute it and/or modify it 354 under the same terms as Perl itself. 355 356 See L<http://www.perl.com/perl/misc/Artistic.html> 357 =cut -
misc/runpugs/lib/Web/Terminal/Server.pm
r14512 r14733 24 24 $SIG{CHLD} = 'IGNORE'; 25 25 26 =pod 27 The messages contain the session id. 28 If the ID does not exist in %terminals, create a new session 29 Otherwise, write to the terminal and send back the result, again 30 with the session id as first line. 31 =cut 26 # The messages contain the session id. 27 # If the ID does not exist in %terminals, create a new session 28 # Otherwise, write to the terminal and send back the result, again 29 # with the session id as first line. 32 30 33 31 our %terminals=(); … … 53 51 my $term = $terminals{$id}; 54 52 $term->{called}=time; 55 my $ init= $term->{'init'};53 my $output= $term->{'output'}; 56 54 my $error= $term->{'error'}; 57 55 if ($error==1) { # Failed to create a new terminal … … 59 57 delete $terminals{$id}; 60 58 } 61 return $ init;59 return $output; 62 60 } 63 61 my $term = $terminals{$id}; … … 84 82 return "Sorry, you can't run more than ${Web::Terminal::Settings::nsessions_ip} sessions from one IP address.\n"; 85 83 } else { 86 print "New $id\n";84 #print "New $id\n"; 87 85 $sessions_per_ip{$ip}++; 88 print "$app $ia $id $cmd\n";86 #print "$app $ia $id $cmd\n"; 89 87 $terminals{$id} = new 90 88 Web::Terminal::Server::Session(app=>$app,ia=>$ia,id=>$id,cmds=>$cmd); … … 122 120 } 123 121 my $nsess=scalar keys %terminals; 124 print scalar(localtime)," : $nsess : $ip : $id : $pid > ",$cmd,"\n";122 #print scalar(localtime)," : $nsess : $ip : $id : $pid > ",$cmd,"\n"; 125 123 print LOG2 scalar(localtime)," : $nsess : $ip : $id : $pid > ",$cmd,"\n"; 126 124 my $lines = &termhandler( $id, $ip, $app,$ia, $cmd ); … … 160 158 if ($pid=fork) { 161 159 #parent here 162 if (-e "/home/andara/apache/data/runpugs2.log") { 163 rename "/home/andara/apache/data/runpugs2.log","/home/andara/apache/data/runpugs2.log.".join("",localtime); 164 } 165 open(LOG2,">/home/andara/apache/data/runpugs2.log"); 160 if (-e 161 "$Web::Terminal::Settings::data_path/$Web::Terminal::Settings::appname.log") { 162 rename 163 "$Web::Terminal::Settings::data_path/$Web::Terminal::Settings::appname.log", 164 "$Web::Terminal::Settings::data_path/$Web::Terminal::Settings::appname.log.".join("",localtime); 165 } 166 open(LOG2,">$Web::Terminal::Settings::data_path/$Web::Terminal::Settings::appname.log"); 166 167 Web::Terminal::Msg->new_server( $host, $port, \&login_proc ); 167 168 Web::Terminal::Msg->event_loop(); … … 216 217 217 218 1; 219 220 __END__ 221 222 =head1 NAME 223 224 Web::Terminal::Server -- Server for Web::Terminal 225 Requires YAML::Syck, Proc::Daemon. 226 227 =head1 SYNOPSIS 228 229 use Web::Terminal::Server; 230 use Web::Terminal::Settings; 231 &Web::Terminal::Server::run(); 232 233 =head1 DESCRIPTION 234 235 This module exports a single subroutine C<run>, which runs the Web::Terminal 236 server. See L<Settings> for configuration options. 237 238 =head1 SEE ALSO 239 240 L<Web::Terminal::Settings>, 241 L<Web::Terminal::Dispatcher>, 242 L<Web::Terminal::Server::Session>, 243 L<Web::Terminal::Msg> 244 245 =head1 AUTHOR 246 247 Wim Vanderbauwhede <wim.vanderbauwhede@gmail.com> 248 249 =head1 COPYRIGHT 250 251 Copyright (c) 2006. Wim Vanderbauwhede. All rights reserved. 252 253 This program is free software; you can redistribute it and/or modify 254 it under the same terms as Perl itself. 255 256 See L<http://www.perl.com/perl/misc/Artistic.html> 257 258 =cut -
misc/runpugs/lib/Web/Terminal/Server/Session.pm
r14512 r14733 7 7 8 8 use Web::Terminal::Settings; 9 =pod 10 A thin wrapper around Net::Telnet 11 new() starts the session; 12 write() sends commands to it. 13 =cut 9 10 #A thin wrapper around Net::Telnet 11 #new() starts the session; 12 #write() sends commands to it. 14 13
