Skip to content

Commit ab7cf8c

Browse files
committed
documentation update
1 parent a826911 commit ab7cf8c

File tree

3 files changed

+30
-4
lines changed

3 files changed

+30
-4
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Perl Executing Browser (PEB) is an HTML5 user interface for [Perl 5](https://www
3030
* [HTML Page API](./doc/SETTINGS.md#html-page-api)
3131
* [Perl Scripts API](./doc/SETTINGS.md#perl-scripts-api)
3232
* [Interactive Perl Scripts](./doc/SETTINGS.md#interactive-perl-scripts)
33+
* [Long-Running Windows Perl Scripts](./doc/SETTINGS.md#long-running-windows-perl-scripts)
3334
* [Starting Local Server](./doc/SETTINGS.md#starting-local-server)
3435
* [Selecting Files and Folders](./doc/SETTINGS.md#selecting-files-and-folders)
3536
* [LOGGING](./doc/LOGGING.md)
@@ -48,9 +49,14 @@ in the documentation of this project are to be interpreted as described in [RFC
4849
## Quick Start
4950

5051
* Common Steps:
51-
* **1.** [Download PEB](https://github.com/ddmitov/perl-executing-browser/releases/latest).
52+
* **1.** [Download PEB](https://github.com/ddmitov/perl-executing-browser/releases/latest).
53+
Linux 64-bit single-file [AppImage](https://appimage.org/) executable and
54+
Windows 32-bit zipped executable with its Qt libraries are available.
5255

5356
* **2.** [Select your Perl distribution](./doc/REQUIREMENTS.md#runtime-requirements).
57+
You can choose between a relocatable Perl distribution and the first Perl on PATH.
58+
Linux 64-bit [Relocatable Perl](https://github.com/skaji/relocatable-perl) or
59+
Windows 32-bit [Strawberry Perl](http://strawberryperl.com/) PortableZIP distributions are available by third-party vendors.
5460

5561
Place your relocatable Perl distribution in:
5662
``{PEB_executable_directory}/resources/app/perl``
@@ -119,7 +125,7 @@ in the documentation of this project are to be interpreted as described in [RFC
119125
* Only single-page applications are supported with no pop-up windows and no Perl scripting inside frames.
120126
* No files can be downloaded.
121127
* ``QtWebEngine`` builds do not support printing and ``window.print()`` is not supported.
122-
* Windows builds of PEB do no support [interactive Perl Scripts](./doc/SETTINGS.md#interactive-perl-scripts).
128+
* Windows builds of PEB do not support [interactive Perl Scripts](./doc/SETTINGS.md#interactive-perl-scripts).
123129

124130
## History
125131

doc/REQUIREMENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Compiling Windows binaries of PEB is subject to the following restrictions:
1010
but only MSVC-based Qt versions 5.6.x or higher include the ``QtWebEngine`` on the Windows platform.
1111
* The source code of PEB is not MSVC-compatible and can not use the ``QtWebEngine``.
1212
* Windows MinGW Qt versions 5.6.x - 5.8.x have neither ``QtWebEngine``, nor ``QtWebKit`` and an updated ``QtWebKit`` has to be manually added from the [QtWebKit repository of Konstantin Tokarev (annulen)](https://github.com/annulen/webkit/releases).
13-
* Windows builds of PEB do no support [interactive Perl Scripts](SETTINGS.md#interactive-perl-scripts) with STDIN event loops.
13+
* Windows builds of PEB do not support [interactive Perl Scripts](SETTINGS.md#interactive-perl-scripts) with STDIN event loops.
1414

1515
Compiled and tested successfully using:
1616

@@ -87,5 +87,5 @@ All compile-time settings require editing the ``src/peb.pro`` project file accor
8787
To use a Perlbrew Perl with PEB create a symlink at:
8888
``{PEB_executable_directory}/resources/perl/bin/perl``
8989

90-
PEB can also use any Perl on PATH if a relocatable Perl distribution is not found in the
90+
PEB will use the first Perl on PATH if a relocatable Perl distribution is not found in the
9191
``{PEB_executable_directory}/resources/app/perl`` folder.

doc/SETTINGS.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,26 @@ A JavaScript settings object for a Perl script run by PEB has the following prop
113113
The only parameter passed to the ``stdoutFunction`` is the STDOUT ``String``.
114114
*This object property is mandatory.*
115115

116+
An example of an immediate STDOUT data display without accumulation:
117+
116118
```javascript
117119
perl_script.stdoutFunction = function (stdout) {
118120
document.getElementById("DOM-element-id").textContent = stdout;
119121
};
120122
```
121123

124+
Please note that many Perl scripts do not give their STDOUT data in a single shot.
125+
If several chunks of output have to be combined, this should also be done at JavaScript level:
126+
127+
```javascript
128+
var accumulatedOutput;
129+
130+
perl_script.stdoutFunction = function (stdout) {
131+
accumulatedOutput = accumulatedOutput + stdout;
132+
document.getElementById("DOM-element-id").textContent = accumulatedOutput;
133+
};
134+
```
135+
122136
* **inputData**
123137
``String`` or ``Function`` supplying user data as its return value
124138
``inputData`` is written on script STDIN.
@@ -206,6 +220,12 @@ The [index.htm](https://github.com/ddmitov/perl-executing-browser/blob/master/re
206220

207221
The [interactive.pl](https://github.com/ddmitov/perl-executing-browser/blob/master/resources/app/perl/interactive.pl) script of the demo package is an example of a Perl interactive script for PEB.
208222

223+
## Long-Running Windows Perl Scripts
224+
225+
Windows builds of PEB do not support [interactive Perl Scripts](./doc/SETTINGS.md#interactive-perl-scripts), but long-running Windows Perl scripts are supported provided that they also have ``$|=1;`` among their first lines to disable the built-in buffering of the Perl interpreter.
226+
227+
Long-running Windows Perl scripts can not receive the ``SIGTERM`` signal and if they are still running when PEB is closed, they can only be killed with no mechanism for a graceful shutdown.
228+
209229
## Starting Local Server
210230

211231
A [Mojolicious](http://mojolicious.org/) application or other local Perl server can be started by PEB provided that

0 commit comments

Comments
 (0)