Skip to content

Commit 074c0b8

Browse files
committed
documentation update
1 parent f156d38 commit 074c0b8

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

README.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ Perl Executing Browser (PEB) is an HTML GUI for [Perl 5](https://www.perl.org/)
66
## Contents
77
* [Quick Start](#quick-start)
88
* [Design Objectives](#design-objectives)
9+
* [Target Audience](#target-audience)
910
* [Features](#features)
1011
* [Compile-time Requirements](#compile-time-requirements)
1112
* [Runtime Requirements](#runtime-requirements)
12-
* [Calling Local Perl Scripts](#calling-local-perl-scripts)
13+
* [Calling User Perl Scripts](#calling-user-perl-scripts)
14+
* [Calling Linux Superuser Scripts](#calling-linux-superuser-scripts)
1315
* [Settings](#settings)
1416
* [Security](#security)
1517
* [Special URLs for Users](#special-urls-for-users)
@@ -18,7 +20,6 @@ Perl Executing Browser (PEB) is an HTML GUI for [Perl 5](https://www.perl.org/)
1820
* [Keyboard Shortcuts](#keyboard-shortcuts)
1921
* [What PEB Is Not](#what-peb-is-not)
2022
* [Limitations](#limitations)
21-
* [Target Audience](#target-audience)
2223
* [History](#history)
2324
* [Application using PEB](#application-using-peb)
2425
* [License](#license)
@@ -30,9 +31,9 @@ Perl Executing Browser (PEB) is an HTML GUI for [Perl 5](https://www.perl.org/)
3031
Use your favorite WYSIWIG editor or code by hand including your favorite libraries or frameworks. PEB supports both HTML 4 & 5, although not all HTML 5 features are supported.
3132
* **1.1.** If your users will have to enter data manually, don't forget to make an appropriate HTML form for them.
3233
* **1.2.** If your users will have to open files or folders, see section [Special URLs for Users](#special-urls-for-users) for information on how to open local files and folders from PEB. You may also see the ```filesystem.html``` file in the demo package shipped with PEB.
33-
* **1.3.** Connect your local HTML file(s) to your Perl 5 scripts. This is best explained in section [Calling Local Perl Scripts](#calling-local-perl-scripts).
34+
* **1.3.** Connect your local HTML file(s) to your Perl 5 scripts. This is best explained in section [Calling User Perl Scripts](#calling-user-perl-scripts).
3435
* **2.** Write your Perl scripts.
35-
The only limitation imposed by PEB on local Perl scripts is the banning of the ```fork``` core function. Input from local HTML files is readd just like reading POST or GET requests in a Perl CGI script. You may see the ```get-post-test.pl``` file in the demo package.
36+
The only limitation imposed by PEB on local Perl scripts is the banning of the ```fork``` core function. Input from local HTML files is read just like reading POST or GET requests in a Perl CGI script. You may see the ```get-post-test.pl``` file in the demo package.
3637

3738
Note that all files and directories used by PEB are relational to the directory where the PEB binary is located, because PEB is created to work from any folder without installation. All your local HTML files and Perl scripts must be located inside the ```{PEB_binary_directory}/resources/app``` directory - see section [Settings](#settings).
3839

@@ -52,6 +53,11 @@ Perl Executing Browser (PEB) is an HTML GUI for [Perl 5](https://www.perl.org/)
5253
* **5. Maximal (re)use of existing web technologies and standards:**
5354
use as much as possible from existing web technologies, standards and their documentation.
5455

56+
## Target Audience
57+
* Perl 5 enthusiasts and developers creating custom desktop applications including rich/thick/fat clients
58+
* DevOps people developing custom Perl-based GUI monitoring and administration solutions
59+
* Perl 5 enthusiasts and developers willing to use the built-in Perl debugger in graphical mode
60+
5561
## Features
5662
**Usability:**
5763
* Perl 5 scripts can be fed from HTML forms using direct GET and POST or AJAX requests to a built-in pseudo-domain.
@@ -96,8 +102,8 @@ Compiled and tested successfully using:
96102
[Perlbrew](https://perlbrew.pl/) Perl distributions (5.18.4, 5.23.7) are successfully used with many Linux builds of PEB.
97103
PEB can also use any Perl on PATH.
98104

99-
## Calling Local Perl Scripts
100-
PEB recognizes two types of local Perl scripts: **long running scripts** and **AJAX scripts**.
105+
## Calling User Perl Scripts
106+
PEB recognizes two types of local user-level Perl scripts: **long running scripts** and **AJAX scripts**.
101107
There is no timeout for all Perl scripts executed by PEB.
102108
* **Long running Perl scripts:**
103109
Long running Perl scripts are expected to produce either:
@@ -110,7 +116,7 @@ Compiled and tested successfully using:
110116

111117
Example: ```http://local-pseudodomain/perl/counter.pl?target=script-results```
112118

113-
The ```target``` query item should point to a valid HTML DOM element. It is removed from the query string before the script is started. Every piece of script output is inserted immediately into the target DOM element of the calling page in this scenario. HTML event called ```scriptoutput``` is emitted when script output is inserted into the calling local page. This event can be binded to a JavaScript function for a variety of reasons including daisy chaining of different scripts. The calling page must not be reloaded during the script execution, otherwise no script output will be inserted.
119+
The ```target``` query item should point to a valid HTML DOM element. It is removed from the query string before the script is started. Every piece of script output is inserted immediately into the target DOM element of the calling page in this scenario. HTML event called ```scriptoutput``` is emitted when script output is inserted into the calling local page. This event can be binded to a JavaScript function for a variety of reasons including daisy chaining of different scripts. The calling page must not be reloaded during the script execution or no script output will be inserted.
114120

115121
Two or more long running scripts can be started within a single calling page. They will be executed independently and their output will be updated in real time using separate target DOM elements. This could be convenient for all sorts of monitoring or data conversion scripts that have to run for a long time.
116122

@@ -146,6 +152,9 @@ Compiled and tested successfully using:
146152
});
147153
```
148154

155+
## Calling Linux Superuser Scripts
156+
Linux superuser Perl scripts with elevated privileges can be started using ```gksudo``` and a special query string item ```user=root```. So if PEB finds an URL like: ```http://local-pseudodomain/perl/root-open-directory.pl?user=root```, it will call ```gksudo```, which will ask the user for the root password and start the script. Output is displayed inside PEB like the output from any other Perl script. User data is supplied to the superuser Perl scripts as the first command line argument without STDIN input or QUERY_STRING environment variable like in the user-level Perl scripts.
157+
149158
## Settings
150159
**Settings based on the existence of certain files and folders:**
151160
PEB is designed to run from any directory without setting anything beforehand and every file or directory that is checked during program startup is relative to the directory where the PEB binary file is located, further labeled as ```{PEB_binary_directory}```.
@@ -413,10 +422,6 @@ They have two functions:
413422
* No file can be downloaded on hard disk.
414423
* No support for plugins and HTML 5 video.
415424

416-
## Target Audience
417-
* Perl 5 enthusiasts and developers creating custom desktop applications including rich/thick/fat clients
418-
* Perl 5 enthusiasts and developers willing to use the built-in Perl debugger in graphical mode
419-
420425
## History
421426
PEB was started as a simple GUI for personal databases in 2013 by Dimitar D. Mitov.
422427

0 commit comments

Comments
 (0)