Created
March 10, 2010 18:27
-
-
Save willert/328172 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use lib '/home/willert/Devel/exparse-interpreter/lib'; | |
use lib '/home/willert/Devel/sig/lib'; | |
use Gtk2 -init; | |
use Gtk2::WebKit; | |
use SiG; | |
use Plack::Loader; | |
my %args = ( | |
host => '127.0.0.1', | |
port => 2567 | |
); | |
SiG->setup_engine('PSGI'); | |
fork && do{ | |
my $app = sub { SiG->run }; | |
Plack::Loader->auto( %args )->run( $app ); | |
}; | |
my $window = Gtk2::Window->new; | |
my $sw = Gtk2::ScrolledWindow->new; | |
my $view = Gtk2::WebKit::WebView->new; | |
$sw->add($view); | |
$window->add($sw); | |
my $loc = "http://$args{host}:$args{port}/"; | |
$view->open( $loc ); | |
$window->show_all; | |
Gtk2->main; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment