NAME
XUL::Node::Application - base class for XUL-Node applications
SYNOPSYS
# subclassing to create your own application
package XUL::Node::Application::MyApp;
use base 'XUL::Node::Application';
sub start { Window(Label(value => 'Welcome to MyApp')) }
# running the application from some handler in a server
use XUL::Node::Application;
XUL::Node::Application->get_constructor('MyApp')->();
# Firefox URL
http://SERVER:PORT/start.xul?MyApp
DESCRIPTION
To create a XUL-Node application, subclass from this class and provide one template method: start()
. It will be called when the application is started.
You can get a callback for running the application by calling the class method get_constructor()
, which returns a CODE
ref that can be run to start the application. This is how the session starts applications.