Last change
on this file since 28 was
23,
checked in by peter, 12 years ago
|
use the subclass style of CGI::Application::Dispatch
|
-
Property svn:executable set to
*
|
File size:
821 bytes
|
Line | |
---|
1 | #!/usr/bin/perl -w |
---|
2 | use strict; |
---|
3 | |
---|
4 | # bookmarklet to add a bookmark via the browser |
---|
5 | # javascript:(function(){window.open("http://grim.ath.cx/~peter/bookmarks?uri="+document.location+"&title="+document.title,"edit_bookmark","width=800,height=250")})() |
---|
6 | |
---|
7 | package BookmarkApp::Dispatch; |
---|
8 | use base 'CGI::Application::Dispatch'; |
---|
9 | |
---|
10 | sub dispatch_args { |
---|
11 | return { |
---|
12 | table => [ |
---|
13 | '[get]' => { app => 'BookmarkApp', rm => 'list' }, |
---|
14 | 'list[get]' => { app => 'BookmarkApp', rm => 'list' }, |
---|
15 | 'feed[get]' => { app => 'BookmarkApp', rm => 'feed' }, |
---|
16 | ':id/:field?[get]' => { app => 'BookmarkApp', rm => 'view' }, |
---|
17 | ':id?[post]' => { app => 'BookmarkApp', rm => 'edit' }, |
---|
18 | ], |
---|
19 | }; |
---|
20 | } |
---|
21 | |
---|
22 | package main; |
---|
23 | BookmarkApp::Dispatch->dispatch(); |
---|
Note: See
TracBrowser
for help on using the repository browser.