Skip to content
Easily add GUI to Perl programs.
Perl HTML XSLT
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Blank
Chatroom
Hello
Notes
atlastk
CHANGELOG.md
LICENSE
README.md

README.md

Perl version of the Atlas toolkit

For Perl

Version 0.10.0

A fast and easy way to add a graphical user interface (GUI) to your Perl programs.

With the Atlas toolkit, both front and back ends are handled by the same code, and the programs will also be reachable from all over the internet.

Only basic knowledge of web technologies are required (no JavaScript knowledge required). And, with the Atlas toolkit, you can easily add a GUI to a programs originally designed to have a CLI, so the users of this programs can choose which interface they want to use.

Hello, World!

Here's how a Hello, World! type program made with the Atlas toolkit looks like:

Little demonstration

  • git clone http://github.com/epeios-q37/atlas-perl
  • cd atlas-perl
  • perl Hello/Hello.py

For a live demonstration: http://q37.info/s/zmzcxvm9 (other live demonstrations: https://q37.info/s/sssznrb4).

Source code:

use Atlas;

my $body = '
<div style="display: table; margin: 50px auto auto auto;">
 <fieldset>
  <input id="input" maxlength="20" placeholder="Enter a name here" type="text"
         data-xdh-onevent="Submit" value="World"/>
  <div style="display: flex; justify-content: space-around; margin: 5px auto auto auto;">
   <button data-xdh-onevent="Submit">Submit</button>
   <button data-xdh-onevent="Clear">Clear</button>
  </div>
 </fieldset>
</div>';

sub acConnect {
    my ($hello, $dom) = @_;

    $dom->setLayout("",$body);
    $dom->focus("input");
}

sub acSubmit {
    my ($hello, $dom) = @_;

    $dom->alert("Hello, " . $dom->getContent("input") . "!");
    $dom->focus("input");
}

sub acClear {
    my ($hello, $dom) = @_;

    if ( $dom->confirm("Are you sure?") ) {
        $dom->setContent("input", "");
    }

    $dom->focus("input");
}

my %callbacks = (
    "" => \&acConnect,
    "Submit" => \&acSubmit,
    "Clear" => \&acClear,
);

Atlas::launch(\%callbacks);

Content of the repository

The atlastk directory contains the Perl source code of the Atlas toolkit.

All other directories are examples.

To run an example, launch perl <Name>/main.pl, where <Name> is the name of the example (Blank, Chatroom…)

Miscellaneous

The Atlas toolkit is also available for:

For more information about the Atlas toolkit, go to http://atlastk.org/.

You can’t perform that action at this time.