[Bps-public-commit] r14815 - in Prophet/branches/dispatcher: lib/Prophet/CLI

sartak at bestpractical.com sartak at bestpractical.com
Tue Aug 5 19:00:48 EDT 2008


Author: sartak
Date: Tue Aug  5 19:00:47 2008
New Revision: 14815

Added:
   Prophet/branches/dispatcher/lib/Prophet/CLI/Dispatcher.pm
Modified:
   Prophet/branches/dispatcher/   (props changed)
   Prophet/branches/dispatcher/Makefile.PL

Log:
 r54131 at gorgoroth:  sartak | 2008-08-05 19:00:39 -0400
 Begin the dispatch logic


Modified: Prophet/branches/dispatcher/Makefile.PL
==============================================================================
--- Prophet/branches/dispatcher/Makefile.PL	(original)
+++ Prophet/branches/dispatcher/Makefile.PL	Tue Aug  5 19:00:47 2008
@@ -24,6 +24,7 @@
 requires('MooseX::AttributeHelpers' => '0.12');
 requires('MooseX::ClassAttribute' => '0.04');
 requires('XML::Atom::SimpleFeed');
+requires('Path::Dispatcher');
 
 features(
     'Web server' => [

Added: Prophet/branches/dispatcher/lib/Prophet/CLI/Dispatcher.pm
==============================================================================
--- (empty file)
+++ Prophet/branches/dispatcher/lib/Prophet/CLI/Dispatcher.pm	Tue Aug  5 19:00:47 2008
@@ -0,0 +1,13 @@
+package Prophet::CLI::Dispatcher;
+use strict;
+use warnings;
+use Path::Dispatcher -base;
+
+on qr{(.*)\s+(\d+)$} => sub {
+    my $cli = shift;
+    $cli->set_arg(id => $1);
+    run($1, $args, @_);
+};
+
+1;
+



More information about the Bps-public-commit mailing list