--- trunk/lib/Frey/Server.pm 2008/11/29 01:05:39 616 +++ trunk/lib/Frey/Server.pm 2008/11/29 15:05:55 617 @@ -35,6 +35,8 @@ =cut +our $editor = Frey::Editor->new; + sub run { my ( $self, $port ) = @_; $server = Continuity->new( @@ -49,6 +51,7 @@ ); $Module::Reload::Debug = 1; # auto if debug_level > 1 Frey::ClassLoader->new->load_all_classes(); + $editor->switch_screen if $ENV{FREY_SWITCH_SCREEN}; $server->loop; } @@ -111,8 +114,6 @@ my $f; - my $editor = Frey::Editor->new; - # shared run params my $run = { request_url => $req->request->url, @@ -131,7 +132,7 @@ $f->request( $req ); } elsif ( $path =~ $editor->url_regex ) { $req->print( $editor->command( $path ) ); - system( $editor->command( $path ) ); + $editor->command( $path ); return; } elsif ( $path =~ m{/([^/]+)/(\w*as_\w+)/?([^/]+)?}