[Bps-public-commit] r12475 - in Prophet/branches/moose: .
sartak at bestpractical.com
sartak at bestpractical.com
Sat May 17 07:43:56 EDT 2008
Author: sartak
Date: Sat May 17 07:43:56 2008
New Revision: 12475
Modified:
Prophet/branches/moose/ (props changed)
Prophet/branches/moose/lib/Prophet/Server/REST.pm
Log:
r56218 at onn: sartak | 2008-05-17 07:43:52 -0400
Moosify Prophet::Server::REST
Modified: Prophet/branches/moose/lib/Prophet/Server/REST.pm
==============================================================================
--- Prophet/branches/moose/lib/Prophet/Server/REST.pm (original)
+++ Prophet/branches/moose/lib/Prophet/Server/REST.pm Sat May 17 07:43:56 2008
@@ -1,16 +1,13 @@
-use warnings;
-use strict;
-
package Prophet::Server::REST;
-use base qw/HTTP::Server::Simple::CGI/;
+use Moose;
use Params::Validate qw/:all/;
use JSON;
+extends 'HTTP::Server::Simple::CGI';
-sub prophet_handle {
- my $self = shift;
- $self->{'_prophet_handle'} = shift if (@_);
- return $self->{'_prophet_handle'};
-}
+has prophet_handle => (
+ is => 'rw',
+ isa => 'Prophet::Replica',
+);
sub handle_request {
my ($self, $cgi) = validate_pos( @_, { isa => 'Prophet::Server::REST'} , { isa => 'CGI' } );
@@ -134,4 +131,7 @@
return '302';
}
+__PACKAGE__->meta->make_immutable;
+no Moose;
+
1;
More information about the Bps-public-commit
mailing list