[Bps-public-commit] r14347 - in Prophet/trunk: . lib/Prophet/CLI/Command lib/Prophet/Server

sartak at bestpractical.com sartak at bestpractical.com
Mon Jul 21 19:23:44 EDT 2008


Author: sartak
Date: Mon Jul 21 19:23:44 2008
New Revision: 14347

Removed:
   Prophet/trunk/lib/Prophet/Server/
Modified:
   Prophet/trunk/   (props changed)
   Prophet/trunk/Makefile.PL
   Prophet/trunk/lib/Prophet/CLI/Command/Server.pm
   Prophet/trunk/lib/Prophet/Server.pm

Log:
 r64650 at onn:  sartak | 2008-07-21 19:23:05 -0400
 Finish moving Prophet::Server::REST to Prophet::Server


Modified: Prophet/trunk/Makefile.PL
==============================================================================
--- Prophet/trunk/Makefile.PL	(original)
+++ Prophet/trunk/Makefile.PL	Mon Jul 21 19:23:44 2008
@@ -28,7 +28,7 @@
 requires('MooseX::ClassAttribute' => '0.04');
 
 features(
-    'REST Server' => [
+    'Web server' => [
         -default => 1,
         'HTTP::Server::Simple', # HTTP::Server::Simple::CGI
         'Test::HTTP::Server::Simple',

Modified: Prophet/trunk/lib/Prophet/CLI/Command/Server.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/CLI/Command/Server.pm	(original)
+++ Prophet/trunk/lib/Prophet/CLI/Command/Server.pm	Mon Jul 21 19:23:44 2008
@@ -2,12 +2,13 @@
 use Moose;
 extends 'Prophet::CLI::Command';
 
+use Prophet::Server;
+
 sub run {
 
     my $self = shift;
 
-    require Prophet::Server::REST;
-    my $server = Prophet::Server::REST->new( $self->arg('port') || 8080 );
+    my $server = Prophet::Server->new( $self->arg('port') || 8080 );
     $server->prophet_handle( $self->app_handle->handle );
     $server->run;
 }

Modified: Prophet/trunk/lib/Prophet/Server.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/Server.pm	(original)
+++ Prophet/trunk/lib/Prophet/Server.pm	Mon Jul 21 19:23:44 2008
@@ -1,4 +1,4 @@
-package Prophet::Server::REST;
+package Prophet::Server;
 use Params::Validate qw/:all/;
 use JSON;
 use base 'HTTP::Server::Simple::CGI';
@@ -10,7 +10,7 @@
 }
 
 sub handle_request {
-    my ($self, $cgi) = validate_pos( @_, { isa => 'Prophet::Server::REST'} ,  { isa => 'CGI' } );
+    my ($self, $cgi) = validate_pos( @_, { isa => 'Prophet::Server'} ,  { isa => 'CGI' } );
     my $http_status;
     if ( my $sub = $self->can( 'handle_request_' . lc( $cgi->request_method ) ) ) {
         $http_status = $sub->( $self, $cgi );



More information about the Bps-public-commit mailing list