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( |
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 |
|
|
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, |
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+)/?([^/]+)?} |