How can I make a rich web application in Perl?

I have a Perl script command line that I want to convert to rich. cross-platform graphical desktop application. What is the best way to do this. I want to use the internal and logical code in Perl, but the GUI should be a rich web application.

+3
source share
4 answers

I am working on a Perl XUL :: Gui module in CPAN that uses Firefox as the host platform for rendering cross-platform gui from Perl. All you need is Firefox installed on the target platforms. It is currently under development, but may be stable enough for your needs. The following is a brief example of what the syntax looks like:

use XUL::Gui;

display Window title => 'Foo Processor',
    Hbox(
        (map {
            my $id = $_;
            CheckBox id => $id,
                label   => "use $id",
                option  => sub {shift->checked eq 'true' ? " -$id" : ()}
          } qw/foo bar baz/
        ),
        TextBox( id => 'num', 
             type   => 'number', 
             option => sub {' -num ' . shift->value}
        ),
        Button( label => 'run', oncommand => sub {
            my @opts = map {$ID{$_}->option} qw/foo bar baz num/;
            $ID{txt}->value = `fooproc @opts`;
        }),
    ),
    TextBox( FILL, id => 'txt' );

Since it is under development, if you have any feature requests (or find any bugs) let me know.

In addition, since you are inside Firefox, any web technologies supported by Firefox (canvas, iframes, flash ...) are fully usable with Perl. For gui components, you can use any combination of HTML and XUL tags.

+12
source

Mojolicious - , -, , -.

, , Unix-, . ( ) : check Mojolicous:: Lite.

+2

? - ? - CGI:: Application - , , , , , Catalyst, -, .

.. Perl, , .

+1

gui web cross platfrom
, , HTML/CSS/JavaScript, HTTP::Server::Simple::CGI CGI::Application HTML::Template. Browser::Open .
+1

Source: https://habr.com/ru/post/1732915/


All Articles