/[SVNBrowser]/trunk/lib/SVNBrowser/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

Annotation of /trunk/lib/SVNBrowser/Dispatcher.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 22 - (hide annotations)
Thu Dec 7 10:04:58 2006 UTC (17 years, 5 months ago) by dpavlin
File size: 446 byte(s)
REST dispatcher, now you can do something like:
http://localhost:7700/actions/author/carnet/
1 dpavlin 5 #
2     package SVNBrowser::Dispatcher;
3    
4     use strict;
5     use warnings;
6    
7     use Jifty::Dispatcher -base;
8    
9     use Data::Dump qw/dump/;
10    
11 dpavlin 22 under '' => [
12 dpavlin 5
13 dpavlin 22 on qr{author/([^/]+)} => run {
14     set author => $1;
15     },
16 dpavlin 5
17 dpavlin 22 on qr{actions} => run {
18     set show_actions => 1;
19     },
20    
21     on qr{page/(\d+)} => run {
22     set on_page => $1;
23     },
24    
25     on qr{from/([^/]+)} => run {
26     set from_date => $1;
27     },
28    
29     on qr{to/([^/]+)} => run {
30     set to_date => $1;
31     },
32    
33     run {
34     show '/list';
35     },
36    
37     ];
38    
39 dpavlin 5 1;

  ViewVC Help
Powered by ViewVC 1.1.26