Changeset 15408 for misc/runpugs/data

Show
Ignore:
Timestamp:
03/02/07 17:08:05 (21 months ago)
Author:
andara
Message:

[runpugs]
-refactoring Server.pm to catch race hazard in preloaded session management.
-adding testing framework.

Location:
misc/runpugs/data
Files:
2 added
2 modified

Legend:

Unmodified
Added
Removed
  • misc/runpugs/data/runp6script.html

    r15377 r15408  
    5252<!-- 
    5353<p>This live web terminal runs the <a href="http://www.pugscode.org">pugs</a> interpreter for <a 
    54 href="http://dev.perl.org/perl6/">Perl&nbsp;6</a>. For more details, read the <a 
     54href="http://dev.perl.org/perl 6/">Perl&nbsp;6</a>. For more details, read the <a 
    5555href="http://feather.perl6.nl/~andara/runpugs/">info page</a>. 
    5656</p> 
     
    101101<p>This live web interface runs the <a href="http://www.pugscode.org">Pugs</a> 
    102102interpreter for <a 
    103 href="http://dev.perl.org/perl6/">Perl 6</a>. Please <a 
     103href="http://dev.perl.org/perl 6/">Perl 6</a>. Please <a 
    104104href="http://feather.perl6.nl/~andara/runpugs/">read the documentation</a>. 
    105105</p> 
  • misc/runpugs/data/runpugs.html

    r14954 r15408  
    33<head> 
    44<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
    5  
    6 <title>Run Perl 6 Now -- in your browser!</title> 
    7 <link rel="stylesheet" type="text/css" href="/runpugs.css"> 
    8 <script language="JavaScript"> 
    9 var nchars=0; 
    10 function getnchars() { 
    11 return document.terminal.cmd.value.length 
    12 } 
    13  
    14 function getcursorpos() { 
    15         var obj=document.terminal.cmd; 
    16         if(document.selection) { 
    17         obj.focus();                     
    18                 var rng=document.selection.createRange();                        
    19         rng.moveStart('character',-nchars); 
    20                 return rng.text.length; 
    21         } else if(obj.selectionStart>=0) { // FireFox 
    22         var start = obj.selectionStart; 
    23         var end   = obj.selectionEnd; 
    24                 if (start<=end) { 
    25                         return start; 
    26                 } else { 
    27                         return end; 
    28            } 
    29         } 
    30 } 
    31  
    32 function catchbackspace(myfield,e) 
    33 { 
    34 var keycode; 
    35 if (window.event) {keycode = window.event.keyCode; 
    36 } 
    37 else if (e) { 
    38 keycode = e.which; 
    39 } 
    40 else return true; 
    41  
    42 if (keycode == 13) 
    43 { 
    44 document.terminal.submit();  
    45 return false; 
    46 } 
    47 if (keycode==38) { 
    48 return false; 
    49 } 
    50 if ((keycode==8)||(keycode==37)||(keycode==46)) { 
    51     if ((getnchars()>nchars) && (getcursorpos() > nchars)) { 
    52         return true; 
    53     } else { 
    54         return false; 
    55     } 
    56 } else { 
    57     return true; 
    58 } 
    59 } 
    60  
    61 //  onkeypress="return catchbackspace(this,event)" onkeydown="return catchbackspace(this,event)" 
    62 function submitenter(myfield,e) 
    63 { 
    64 var keycode; 
    65 if (window.event) keycode = window.event.keyCode; 
    66 else if (e) keycode = e.which; 
    67 else return true; 
    68 if (keycode == 13) 
    69 { 
    70 document.terminal.submit(); 
    71 return false; 
    72 } 
    73 else { 
    74 if (keycode == 8) { 
    75 if (getnchars()>nchars) { 
    76 return true; 
    77 } else { 
    78 return false; 
    79 } 
    80 } else { 
    81 return true; 
    82 } 
    83 } 
    84 } 
    85  
    86 function select_enter() 
    87 { 
    88 /* _SKIPC_ 
    89 document.terminal.cmdline.value=document.terminal.hist.options[document.terminal.hist.selectedIndex].value; 
    90 document.terminal.hist.selectedIndex=0; 
    91 document.terminal.cmdline.focus(); 
    92 _SKIPC_ */ 
    93 /* _SKIPT_ 
    94 document.terminal.cmd.value+=document.terminal.hist.options[document.terminal.hist.selectedIndex].value; 
    95 document.terminal.hist.selectedIndex=0; 
    96 document.terminal.cmd.focus(); 
    97 document.terminal.cmd.scrollTop =document.terminal.cmd.scrollHeight;  
    98 _SKIPT_ */ 
    99 } 
    100  
    101 function select_enter_OFF(myfield,e) 
    102 { 
    103 var keycode; 
    104 if (window.event) keycode = window.event.keyCode; 
    105 else if (e) keycode = e.which; 
    106 else return true; 
    107 if (keycode == 13) 
    108 { 
    109 document.terminal.cmdline.value=document.terminal.hist.options[document.terminal.hist.selectedIndex].value; 
    110 return false; 
    111 } 
    112 else 
    113 return true; 
    114 } 
    115 </script> 
    1165</head> 
    1176<body> 
    118 <div id="mainwindow"> 
    119 <h1>Run Perl 6 now -- in your browser!</h1> 
    120 <form id="term" name="terminal" action="/cgi-perl/runpugs" method="POST">                   
     7<form id="term" name="terminal" action="/perl/runpugs.pl" method="POST">                   
    1218<input type="hidden" name="prompt" value="_PROMPTW_"> 
    1229<input type="hidden" name="sessionid" value=""> 
    12310<input type="hidden"    name="ia" value="1"> 
    12411<input type="hidden"    name="action" value="runpugs"> 
    125 <input type="radio" id="rel" value="0" name="reldev" _REL_ ><label 
    126 for="rel">Release version</label>&nbsp;&nbsp; 
    127 <input type="radio" id="dev" value="1" name="reldev" _DEV_ ><label 
    128 for="dev">Development version</label> 
    129 <div id="termwindow"> 
    130 <select name="history" id="hist" onChange="select_enter()"> 
     12<input type="radio" id="rel" value="0" name="reldev" _REL_ > 
     13<input type="radio" id="dev" value="1" name="reldev" _DEV_ > 
     14<select name="history" id="hist" > 
    13115<option value="">--- Recent commands ---</option> 
    13216_HIST_ 
    13317</select> 
    134 <br> 
    135 <!-- _SKIPT_ 
    136 <textarea id="cmd" name="cmd" rows="20" cols="80" wrap="virtual" onkeypress="return catchbackspace(this,event)" onkeydown="return catchbackspace(this,event)"> 
     18<textarea id="cmd" name="cmd" rows="20" cols="80"> 
    13719_ALL_ 
    13820</textarea> 
    139 _SKIPT_ --> 
    140 <!--_SKIPC_ 
    141 <textarea readonly id="output" name="output" rows="_NROWS_" cols="80" wrap="virtual"> 
    142 _REPLYW_ 
    143 </textarea> 
    144 <br> 
    145 <label for="cmdline"><span class="prompt"> 
    146 _NPROMPTW_ 
    147 </span> 
    148 <input type="text" size="74" id="cmdline" name="cmdline" value="" 
    149 onKeyPress="return submitenter(this,event)"> 
    150 </label> 
    151 _SKIPC_ -->  
    152 </div> 
    153 <input id="enter" type="submit" value="Submit">&nbsp;&nbsp;&nbsp; 
     21<input id="enter" type="submit" value="Submit"> 
    15422</form> 
    155 <script language="JavaScript"> 
    156 document.terminal.enter.style.display='none'; 
    157 document.terminal.cmdline.focus() // _SKIPT_ 
    158 document.terminal.cmd.focus() // _SKIPC_ 
    159 document.terminal.output.scrollTop =document.terminal.output.scrollHeight; // _SKIPT_ 
    160 document.terminal.cmd.scrollTop =document.terminal.cmd.scrollHeight; // _SKIPC_ 
    161 //if (document.terminal.output.rows==1) { 
    162 //document.terminal.output.style.height="2ex"; 
    163 //} 
    164 nchars=document.terminal.cmd.value.length; 
    165 </script> 
    166 <p>This live web terminal runs the <a href="http://www.pugscode.org">pugs</a> interpreter for <a 
    167 href="http://dev.perl.org/perl 6/">Perl&nbsp;6</a>. Please <a 
    168 href="http://feather.perl6.nl/~andara/runpugs/">read the documentation</a>. 
    169 </p> 
    170 <p class="copyright">&copy; Copyright 2006 by Wim.Vanderbauwhede. Contact me 
    171 at gmail.com.</p> 
    172 </div> 
    17323</body> 
    17424</html>