/[Frey]/trunk/lib/Frey/Server.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/Frey/Server.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 616 by dpavlin, Fri Nov 28 15:07:32 2008 UTC revision 617 by dpavlin, Sat Nov 29 15:05:55 2008 UTC
# Line 35  This is one of pissible server implement Line 35  This is one of pissible server implement
35    
36  =cut  =cut
37    
38    our $editor = Frey::Editor->new;
39    
40  sub run {  sub run {
41          my ( $self, $port ) = @_;          my ( $self, $port ) = @_;
42          $server = Continuity->new(          $server = Continuity->new(
# Line 49  sub run { Line 51  sub run {
51          );          );
52          $Module::Reload::Debug = 1; # auto if debug_level > 1          $Module::Reload::Debug = 1; # auto if debug_level > 1
53          Frey::ClassLoader->new->load_all_classes();          Frey::ClassLoader->new->load_all_classes();
54            $editor->switch_screen if $ENV{FREY_SWITCH_SCREEN};
55          $server->loop;          $server->loop;
56  }  }
57    
# Line 111  sub main { Line 114  sub main {
114    
115                  my $f;                  my $f;
116    
                 my $editor = Frey::Editor->new;  
   
117                  # shared run params                  # shared run params
118                  my $run = {                  my $run = {
119                          request_url => $req->request->url,                          request_url => $req->request->url,
# Line 131  sub main { Line 132  sub main {
132                          $f->request( $req );                          $f->request( $req );
133                  } elsif ( $path =~ $editor->url_regex ) {                  } elsif ( $path =~ $editor->url_regex ) {
134                          $req->print( $editor->command( $path ) );                          $req->print( $editor->command( $path ) );
135                          system( $editor->command( $path ) );                          $editor->command( $path );
136                          return;                          return;
137                  } elsif (                  } elsif (
138                          $path =~ m{/([^/]+)/(\w*as_\w+)/?([^/]+)?}                          $path =~ m{/([^/]+)/(\w*as_\w+)/?([^/]+)?}

Legend:
Removed from v.616  
changed lines
  Added in v.617

  ViewVC Help
Powered by ViewVC 1.1.26