Web::Gui - render cross platform gui applications in a web browser from perl


version 0.63

this module is under active development, interfaces may change.

this code is currently in beta, use in production environments at your own risk


    use Web::Gui;
    display P 'hello, world!';  # P is the HTML <p> tag

    use Web::Gui;
        H3('Web Gui!'),
        (SPAN style => q{
                background-color: #222;
                outline: 2px solid #444;
                padding: 10px;
                margin:  10px;
            (INPUT type => 'button',
                  value => 'click me',
                onclick => sub {print "hello\n"}
            (INPUT type => 'button',
                  value => 'function',
                onclick => function q{alert("world!")}


this module is a thin wrapper around XUL::Gui that disables the mozilla specific portions (all of the XUL tags, the filepicker, trusted mode features), but in turn allows you to create gui's in HTML + CSS that should run on most modern browsers.

See XUL::Gui for details.

Selected macros may be coming to simplify dealing with forms and tables, sub Button {INPUT type => 'button', @_}


using this module is the same as:

    use XUL::Gui qw(... !:xul);

    display mozilla => 0, ...;


internet explorer has limited support for some of the mechanisms used in XUL::Gui. some things won't work right or at all. event handlers work if you use _onclick instead of onclick (since ie doesn't support setting event handlers with setAttribute like every other browser...)

ymmv. patches welcome


Eric Strom, <asg at>


copyright 2009-2010 Eric Strom.

this program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

see for more information.