You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/SETTINGS.md
+5-15Lines changed: 5 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,30 +60,22 @@ The ``pebSettings`` JavaScript object may have the following properties:
60
60
61
61
Every Perl script run by PEB has a JavaScript settings object with an arbitrary name and fixed object properties. The name of the JavaScript settings object with a ``.script`` extension forms a pseudo link used to start the Perl script.
62
62
63
-
There are three methods to start a local Perl script:
63
+
There are two methods to start a local Perl script:
64
64
65
-
***Clicking a link to a script pseudo link:**
65
+
***Clicking a link to a pseudo link:**
66
66
67
67
```html
68
68
<ahref="test.script">Start Perl script</a>
69
69
```
70
70
71
-
***Submitting a form to a script pseudo link:**
71
+
***Submitting a form to a pseudo link:**
72
72
73
73
```html
74
74
<formaction="test.script">
75
75
<inputtype="submit"value="Start Perl script">
76
76
</form>
77
77
```
78
78
79
-
***Calling a JavaScript function with a script pseudo link:**
80
-
81
-
```javascript
82
-
peb.startScript('test.script');
83
-
```
84
-
85
-
This method creates an invisible form and submits it to the script pseudo link.
86
-
87
79
An example of a JavaScript settings object for a Perl script run by PEB:
88
80
89
81
```javascript
@@ -148,13 +140,12 @@ A JavaScript settings object for a Perl script run by PEB has the following prop
148
140
149
141
## Interactive Perl Scripts
150
142
151
-
Each PEB interactive Perl script must have its own event loop waiting constantly for new data on STDIN or in a temporary file for a bidirectional connection with PEB. Many interactive scripts can be started simultaneously in one PEB instance. One script may be started in many instances, provided that each of them has an uniquely named JavaScript settings object.
143
+
Each PEB interactive Perl script must have its own event loop waiting constantly for new data on STDIN or in a temporary file for a bidirectional connection with PEB. Many interactive scripts can be started simultaneously in one PEB instance. One script may be started in many instances, provided that each of them has a JavaScript settings object with an unique name.
152
144
153
145
A PEB interactive Perl script should have the following features:
154
146
155
147
***No buffering**
156
148
PEB interactive scripts should run with no output buffering preventing output before the script has ended.
157
-
158
149
Output buffering could be disabled using the following code:
159
150
160
151
```perl
@@ -164,8 +155,7 @@ A PEB interactive Perl script should have the following features:
164
155
```
165
156
166
157
***Failsafe print**
167
-
Failsafe print is necessary for a graceful shutdown of Perl scripts on normal PEB exit and when PEB unexpectedly crashes. When the close button is pressed, PEB closes the STDOUT and STDERR channels of all running Perl scripts and within 3 seconds they must detect their inability to print messages and exit or any unresponsive scripts will be killed.
168
-
158
+
Failsafe print is necessary to shut down PEB Perl scripts when PEB unexpectedly crashes.
169
159
Failsafe print could be implemented using the following code:
Perl Executing Browser (PEB) is an HTML5 user interface for Perl 5 desktop applications. It is a C++ Qt 5 application running local Perl 5 scripts as child processes without server. Inspired by Electron and NW.js, PEB is another reuse of web technologies in desktop applications with Perl doing the heavy lifting instead of Node.js.
177
+
Perl Executing Browser (PEB) is an HTML5 user interface for Perl 5 desktop applications.
178
+
It is a C++ Qt 5 application running local Perl 5 scripts as child processes without server.
179
+
Inspired by Electron and NW.js, PEB is another reuse of web technologies in
180
+
desktop applications with Perl doing the heavy lifting instead of Node.js.
Perl Executing Browser (PEB) is an HTML5 user interface for Perl 5 desktop applications. It is a C++ Qt 5 application running local Perl 5 scripts as child processes without server. Inspired by Electron and NW.js, PEB is another reuse of web technologies in desktop applications with Perl doing the heavy lifting instead of Node.js.
153
+
Perl Executing Browser (PEB) is an HTML5 user interface for Perl 5 desktop applications.
154
+
It is a C++ Qt 5 application running local Perl 5 scripts as child processes without server.
155
+
Inspired by Electron and NW.js, PEB is another reuse of web technologies in
156
+
desktop applications with Perl doing the heavy lifting instead of Node.js.
0 commit comments