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
Perl Executing Browser (PEB) is an HTML user interface for [Perl 5](https://www.perl.org/) desktop applications. It runs local Perl 5 scripts without server and with no timeout and is implemented as a C++ compiled executable based on [Qt 5](https://www.qt.io/) and [QtWebKit](https://trac.webkit.org/wiki/QtWebKit) libraries. PEB Perl scripts are fed from HTML forms using GET or POST requests to a built-in pseudo-domain. HTML interface for the [default Perl debugger](http://perldoc.perl.org/perldebug.html) is also available.
9
+
Perl Executing Browser (PEB) is an HTML user interface for [Perl 5](https://www.perl.org/) desktop applications. It runs local Perl 5 scripts without server and with no timeout and is implemented as a C++ compiled executable based on [Qt 5](https://www.qt.io/) and [QtWebKit](https://trac.webkit.org/wiki/QtWebKit) libraries. PEB Perl scripts are fed from HTML forms using GET or POST requests to a built-in pseudo-domain.
10
10
11
11
Inspired by [NW.js](http://nwjs.io/) and [Electron](http://electron.atom.io/), PEB is another reuse of web technologies in desktop applications with Perl doing the heavy lifting. In contrast to [NW.js](http://nwjs.io/) and [Electron](http://electron.atom.io/), PEB enforces strict separation between trusted and untrusted content in different browser windows.
12
12
@@ -26,13 +26,12 @@ Inspired by [NW.js](http://nwjs.io/) and [Electron](http://electron.atom.io/), P
26
26
*[Settings](#settings)
27
27
*[Security](#security)
28
28
*[Special URLs](#special-urls)
29
-
*[Perl Debugger GUI](#perl-debugger-gui)
30
29
*[Local File Types](#local-file-types)
31
30
*[Keyboard Shortcuts](#keyboard-shortcuts)
32
31
*[What PEB Is Not](#what-peb-is-not)
33
32
*[Limitations](#limitations)
34
33
*[History](#history)
35
-
*[Application using PEB](#application-using-peb)
34
+
*[Applications Based on PEB](#applications-based-on-peb)
36
35
*[License](#license)
37
36
*[Authors](#authors)
38
37
@@ -65,10 +64,8 @@ Inspired by [NW.js](http://nwjs.io/) and [Electron](http://electron.atom.io/), P
65
64
## Target Audience
66
65
* Perl 5 enthusiasts and developers creating custom desktop applications including rich/thick/fat clients
67
66
* DevOps people in need of custom Perl-based GUI monitoring and administration solutions
68
-
* Perl 5 enthusiasts and developers willing to use the built-in Perl debugger in graphical mode
69
67
70
68
## Features
71
-
**Usability:**
72
69
*[Perl scripts can be fed from HTML forms using GET and POST requests to a built-in pseudo-domain.](#feeding-from-forms)
73
70
*[Perl scripts featuring STDIN event loops can be repeatedly fed with data.](#interactive-perl-scripts)
74
71
*[Linux superuser Perl scripts can be started.](#linux-superuser-perl-scripts)
@@ -85,9 +82,6 @@ Inspired by [NW.js](http://nwjs.io/) and [Electron](http://electron.atom.io/), P
85
82
*[Optional translation of the JavaScript *Alert*, *Confirm* and *Prompt* dialog boxes using JavaScript](#custom-or-translated-labels-for-javascript-dialog-boxes)
86
83
*[Optional warning for unsaved data in HTML forms before closing a window to prevent accidental data loss](#warning-for-unsaved-user-input-before-closing-a-window)
87
84
*[Any icon can be displayed on windows and message boxes.](#icon)
88
-
89
-
**Development goodies:**
90
-
*[PEB can interact with the Perl 5 debugger in graphical mode.](#perl-debugger-gui)
91
85
*``QWebInspector`` window can be invoked using <kbd>Ctrl</kbd> + <kbd>I</kbd> keyboard shortcut.
92
86
*[Optional logging of all browser actions](#log-files)
93
87
@@ -126,21 +120,15 @@ Changing the compile-time variables of PEB requires editing its project file - `
126
120
CONFIG += app_bundle
127
121
```
128
122
129
-
<aname="security-compile-time-variables"></a>
130
-
The following two compile-time variables can tighten further the security of PEB.
123
+
<aname="security-compile-time-variable"></a>
124
+
The following compile-time variable can tighten further the security of PEB.
To disable administrative privileges check: ``ADMIN_PRIVILEGES_CHECK = 0``
134
128
By default administrative privileges check is disabled.
135
129
To enable administrative privileges check: ``ADMIN_PRIVILEGES_CHECK = 1``
136
130
If administrative privileges check is enabled and PEB is started with administrative privileges, a warning page is displayed and no scripts can be executed. Starting Linux superuser scripts is not possible in this scenario.
137
131
138
-
***Perl debugger GUI:**``PERL_DEBUGGER_GUI``
139
-
To enable Perl debugger GUI: ``PERL_DEBUGGER_GUI = 1``
140
-
By default Perl debugger GUI is enabled.
141
-
To disable Perl debugger GUI: ``PERL_DEBUGGER_GUI = 0``
142
-
If PEB is going to be compiled for end users and Perl debugger GUI is not needed or not wanted for security reasons, it can be turned off.
143
-
144
132
## Runtime Requirements
145
133
* Qt 5 libraries - their full Linux list can be found inside the ``start-peb.sh`` script,
146
134
* Perl 5 distribution - any Linux, Mac or Windows Perl distribution.
@@ -402,11 +390,9 @@ They have two functions:
402
390
a warning message blocks the entire browser window until user goes to the start page to restore local Perl scripting.
403
391
* Local Perl scripts can not be started from untrusted pages.
404
392
* Files or folders can not be selected with their full paths from untrusted pages.
405
-
* PEB HTML interface for the Perl debugger can not be accessed from an untrusted page.
406
393
* Cross-site scripting is disabled for all web and local pages.
407
-
* Plugin support is disabled.
408
394
409
-
**[Optional security features based on compile-time variables](#security-compile-time-variables)**
395
+
**[Optional security feature based on compile-time variable](#security-compile-time-variable)**
***Close current window:**``http://local-pseudodomain/close-window.function``
473
459
Please note that the window from where this URL was called will be closed immediately without any check for unsaved user data in HTML forms. Window-closing URL was implememented to enable asynchronous JavaScript routines for window closing confirmation - see section *Settings*, paragraph [Warning for unsaved user input before closing a window](#warning-for-unsaved-user-input-before-closing-a-window).
474
460
475
-
The following special URLs are implemented for the Perl debugger GUI:
476
-
477
-
***Select file to debug:**``http://local-pseudodomain/perl-debugger.function?action=select-file``
PEB is also an HTML user interface for the default Perl debugger. Any Perl script can be selected for debugging and the debugger output is displayed together with the syntax highlighted source code of the debugged script and its modules.
483
-
484
-
PEB-based Perl debugger GUI is an idea proposed by Valcho Nedelchev and provoked by the scarcity of graphical frontends for the Perl debugger.
485
-
486
-
Syntax highlighting is achieved using [Syntax::Highlight::Engine::Kate](https://metacpan.org/release/Syntax-Highlight-Engine-Kate) CPAN module by Hans Jeuken and Gábor Szabó.
487
-
488
-
``{PEB_binary_directory}/resources/app/perl5dbgui`` is home of the Perl debugger GUI script and the [Syntax::Highlight::Engine::Kate](https://metacpan.org/release/Syntax-Highlight-Engine-Kate) module. This folder and all files inside it should not be removed or renamed for the proper operation of the Perl debugger GUI.
489
-
490
-
**Windows caveat:** The [default Perl debugger](http://perldoc.perl.org/perldebug.html) can not work with PEB on Windows without a small, one-line modification, which makes the ``$console`` variable undefined. Tests proved that this is a minor change and it does not affect the normal operation of the debugger. This alteration is necessary because the ``Qprocess`` class, which is used to handle the Perl debugger, does not use any console from the underlying operating system. Without the modification the debugger is unable to find a console and hangs. You could easily patch your Windows version of ``perl5db.pl`` manually by replacing ``$console = "con";`` with ``undef $console;`` or by using ``{PEB_binary_directory}/resources/app/perl5dbgui/perl5db-win32.patch``.
491
-
492
-

493
-
494
461
## Local File Types
495
462
All file types not listed here are unsupported. If they are linked from local pages, they will be opened using the default application of the operating system.
496
463
@@ -527,7 +494,7 @@ Syntax highlighting is achieved using [Syntax::Highlight::Engine::Kate](https://
527
494
* PEB does not embed any Perl interpreter in itself and relies on an external Perl distribution, which could be easily changed or upgraded independently.
528
495
529
496
## Limitations
530
-
* No page produced by a local Perl script can be reloaded because no temporary files for script output are written.
497
+
* No page produced by a local Perl script can be reloaded because no temporary files are written.
531
498
Local HTML pages, as well as web pages, can be reloaded using the JavaScript function ``location.reload()``.
532
499
* No history and cache.
533
500
JavaScript functions ``window.history.back()``, ``window.history.forward()`` and ``window.history.go()`` are disabled.
@@ -537,8 +504,9 @@ Syntax highlighting is achieved using [Syntax::Highlight::Engine::Kate](https://
537
504
## History
538
505
PEB was started as a simple GUI for personal databases in 2013 by Dimitar D. Mitov.
539
506
540
-
## Application using PEB
507
+
## Applications Based on PEB
541
508
*[Epigraphista](https://github.com/ddmitov/epigraphista) is an [EpiDoc](https://sourceforge.net/p/epidoc/wiki/Home/) XML file creator. It is implemented as a hybrid desktop and server application using [Perl Executing Browser](https://github.com/ddmitov/perl-executing-browser), [Electron](http://electron.atom.io/) or [NW.js](http://nwjs.io/) as a desktop GUI framework, [Bootstrap](http://getbootstrap.com/) for a themable HTML 5 user interface, JavaScript for on-screen text conversion and [Perl 5](https://www.perl.org/) for a file-writing backend.
509
+
*[Camel Doctor](https://github.com/ddmitov/camel-doctor) is an HTML user interface for the [default Perl debugger](http://perldoc.perl.org/perldebug.html).
0 commit comments