Skip to content

Instantly share code, notes, and snippets.

@willert
Created March 10, 2010 18:27
Show Gist options
  • Save willert/328172 to your computer and use it in GitHub Desktop.
Save willert/328172 to your computer and use it in GitHub Desktop.
#!/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