source: bookmarks/trunk/index.cgi @ 7

Last change on this file since 7 was 5, checked in by peter, 12 years ago

Switched to using CGI::Application and CGI::Application::Dispatch for the web application organization and dispatching, instead of the custom dispatch code

  • Property svn:executable set to *
File size: 559 bytes
Line 
1#!/usr/bin/perl -w
2use 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
7use CGI::Application::Dispatch;
8CGI::Application::Dispatch->dispatch(
9    table => [
10        '[get]'              => { app => 'BookmarkApp', rm => 'list' },
11        ':id/:field?[get]'   => { app => 'BookmarkApp', rm => 'view' },
12        ':id?[post]'         => { app => 'BookmarkApp', rm => 'edit' },
13    ],
14);
Note: See TracBrowser for help on using the repository browser.