[Catalyst-commits] r7941 -
trunk/Catalyst-Engine-Wx/lib/Catalyst/Engine
eriam at dev.catalyst.perl.org
eriam at dev.catalyst.perl.org
Mon Jun 23 20:43:03 BST 2008
Author: eriam
Date: 2008-06-23 20:43:02 +0100 (Mon, 23 Jun 2008)
New Revision: 7941
Modified:
trunk/Catalyst-Engine-Wx/lib/Catalyst/Engine/Wx.pm
Log:
Made possible to simply pass the boostrap path to the options
Modified: trunk/Catalyst-Engine-Wx/lib/Catalyst/Engine/Wx.pm
===================================================================
--- trunk/Catalyst-Engine-Wx/lib/Catalyst/Engine/Wx.pm 2008-06-23 19:42:46 UTC (rev 7940)
+++ trunk/Catalyst-Engine-Wx/lib/Catalyst/Engine/Wx.pm 2008-06-23 19:43:02 UTC (rev 7941)
@@ -13,7 +13,7 @@
use IO::String;
use URI;
-our $VERSION = "0.02_05";
+our $VERSION = "0.02_06";
my $uri_proto = URI->new();
my $app;
@@ -31,12 +31,15 @@
sub run {
my ( $self, $class, $options ) = @_;
-
-#print "OK\n";
+ if (ref($options) ne 'HASH' && defined $options) {
+ $self->{bootstrap} = $options;
+ $options = {};
+ }
+ else {
+ $options ||= {};
+ $self->{bootstrap} = delete $options->{bootstrap} || '/';
+ }
- $options ||= {};
- $self->{bootstrap} = delete $options->{bootstrap} || '/';
-
POE::Session->create(
object_states => [
$self => [
@@ -97,6 +100,8 @@
my $controller = $request->{'controller'} || '/';
+ print "controller $controller \n";
+
if ($controller =~ /\->/) {
$controller =~ s/^Root//g
if $controller =~ /^Root/;
More information about the Catalyst-commits
mailing list