22 |
} |
} |
23 |
} |
} |
24 |
|
|
25 |
|
use Frey::ClassLoader; |
26 |
|
|
27 |
# This method will run once at server start |
# This method will run once at server start |
28 |
sub startup { |
sub startup { |
29 |
my $self = shift; |
my $self = shift; |
30 |
|
|
31 |
|
Frey::ClassLoader->new->load_all_classes(); |
32 |
|
|
33 |
# The routes |
# The routes |
34 |
my $r = $self->routes; |
my $r = $self->routes; |
35 |
|
|
36 |
# Default route |
# Default route |
37 |
$r->route('/:controller/:action/:id') |
$r->route('/:controller/:action/:class') |
38 |
->to(controller => 'example', action => 'welcome', id => 1); |
->to(controller => 'run', action => 'markup', class => 'Frey::ClassBrowser'); |
39 |
} |
} |
40 |
|
|
41 |
1; |
1; |