[Catalyst-commits] r6498 -
trunk/Catalyst-Engine-Wx/lib/Catalyst/Engine
eriam at dev.catalyst.perl.org
eriam at dev.catalyst.perl.org
Tue Jul 3 16:13:34 GMT 2007
Author: eriam
Date: 2007-07-03 16:13:34 +0100 (Tue, 03 Jul 2007)
New Revision: 6498
Modified:
trunk/Catalyst-Engine-Wx/lib/Catalyst/Engine/Wx.pm
Log:
Deals with events and requests for controllers and methods
Modified: trunk/Catalyst-Engine-Wx/lib/Catalyst/Engine/Wx.pm
===================================================================
--- trunk/Catalyst-Engine-Wx/lib/Catalyst/Engine/Wx.pm 2007-07-03 15:10:49 UTC (rev 6497)
+++ trunk/Catalyst-Engine-Wx/lib/Catalyst/Engine/Wx.pm 2007-07-03 15:13:34 UTC (rev 6498)
@@ -42,14 +42,14 @@
$kernel->alias_set('catalyst-wxperl');
- POE::Kernel->post('catalyst-wxperl', '_KEEPALIVE');
+ POE::Kernel->post('catalyst-wxperl', '_keepalive');
POE::Kernel->post('catalyst-wxperl', '_PULSE');
},
- _KEEPALIVE => sub {
- $_[KERNEL]->delay('_KEEPALIVE', 20);
+ _keepalive => sub {
+ $_[KERNEL]->delay('_keepalive', 20);
},
_stop => sub {
- $_[KERNEL]->delay('_KEEPALIVE');
+ $_[KERNEL]->delay('_keepalive');
}
}
);
@@ -70,6 +70,7 @@
sub EVENT_REQUEST {
my ($self, $kernel, $heap, $session, $request) = @_[OBJECT, KERNEL, HEAP, SESSION, ARG0];
+
$heap->{'class'}->handle_request($request);
}
@@ -77,7 +78,20 @@
my ( $self, $c, $request ) = @_;
my $controller = $request->{'controller'} || '/';
+
+ if ($controller =~ /\->/) {
+ $controller =~ s/^Root//g
+ if $controller =~ /^Root/;
+
+ $controller =~ s/\->/\//g;
+ $controller =~ s/::/\//g;
+
+ $controller = lc($controller);
+ }
+ $controller = '/'.$controller
+ if ($controller !~ /^\//);
+
foreach (keys %{ $request }) {
$c->request->parameters->{$_} = $request->{$_};
}
@@ -98,7 +112,8 @@
$base->path_query($base_path);
$c->request->base($base);
- $c->stash->{'_parent'} = $request->{'parent'};
+ $c->stash->{'_parent'} = $request->{'parent'};
+ $c->stash->{'_event'} = $request->{'event'};
}
=head1 NAME
More information about the Catalyst-commits
mailing list