/[Perly]/lib/Perly/Dispatcher.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

Contents of /lib/Perly/Dispatcher.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 37 - (show annotations)
Thu Jun 7 09:44:58 2007 UTC (17 years, 1 month ago) by dpavlin
File size: 649 byte(s)
preferences page
1 package Perly::Dispatcher;
2
3 use strict;
4 use warnings;
5
6 use Jifty::Dispatcher -base;
7
8 use Data::Dump qw/dump/;
9
10 before '*' => run {
11 my $top = Jifty->web->navigation;
12 my $user = Jifty->web->current_user->user_object;
13
14 # Jifty->log->debug("current_user = ", dump( $user ));
15
16 $top->child( 'Upload' => url => '/upload' );
17 $top->child( 'Run' => url => '/run' );
18 $top->child( 'Prefs' => url => '/prefs' )
19 if Jifty->web->current_user->id;
20
21 };
22
23 under '/run' => [
24 on qr{code=(\d+)} => run {
25 set code => $1;
26 },
27 on qr{input=(\d+)} => run {
28 set input => $1;
29 },
30 show '/run',
31 ];
32
33 on qr{/edit/id=(\d+)} => run {
34 set id => $1;
35 show '/edit';
36 };
37
38 1;

  ViewVC Help
Powered by ViewVC 1.1.26