[Catalyst-commits] r6375 -
trunk/Catalyst-Engine-Wx/lib/Catalyst/Engine
eriam at dev.catalyst.perl.org
eriam at dev.catalyst.perl.org
Tue May 8 20:09:31 GMT 2007
Author: eriam
Date: 2007-05-08 20:09:30 +0100 (Tue, 08 May 2007)
New Revision: 6375
Modified:
trunk/Catalyst-Engine-Wx/lib/Catalyst/Engine/Wx.pm
Log:
Added event that stops the session, make sure the Wx loop is used and add flags for POE debugging.
Modified: trunk/Catalyst-Engine-Wx/lib/Catalyst/Engine/Wx.pm
===================================================================
--- trunk/Catalyst-Engine-Wx/lib/Catalyst/Engine/Wx.pm 2007-05-08 19:06:36 UTC (rev 6374)
+++ trunk/Catalyst-Engine-Wx/lib/Catalyst/Engine/Wx.pm 2007-05-08 19:09:30 UTC (rev 6375)
@@ -3,8 +3,10 @@
use strict;
use warnings;
-use POE;
-use POE::Loop::Wx;
+sub POE::Kernel::ASSERT_DEFAULT () { 0 }
+sub POE::Kernel::TRACE_DEFAULT () { 0 }
+
+use POE qw( Loop::Wx );
use POE::Session;
use Data::Dumper;
@@ -18,7 +20,7 @@
use Errno 'EWOULDBLOCK';
sub run {
- my ( $self, $class, $port, $host, $options ) = @_;
+ my ( $self, $class, $options ) = @_;
$options ||= {};
@@ -33,6 +35,8 @@
_start => sub {
my ($kernel, $heap, $session) = @_[KERNEL, HEAP, SESSION];
+ $heap->{start_time} = time();
+
$heap->{'class'} = $class;
$kernel->alias_set('_WAXALYST');
@@ -41,14 +45,14 @@
POE::Kernel->post('_WAXALYST', '_PULSE');
},
_KEEPALIVE => sub { $_[KERNEL]->delay('_KEEPALIVE', 20); },
+ _stop => sub { $_[KERNEL]->delay('_KEEPALIVE'); }
}
);
- my $app = Wx::SimpleApp->new;
-
+ $app = Wx::SimpleApp->new;
+
+ POE::Kernel->loop_run();
POE::Kernel->run();
-
- exit;
}
sub _PULSE {
@@ -58,7 +62,6 @@
sub EVENT_REQUEST {
my ($kernel, $heap, $session, $request) = @_[KERNEL, HEAP, SESSION, ARG0];
-
$heap->{'class'}->handle_request($request);
}
More information about the Catalyst-commits
mailing list