Permalink
Browse files

no MooseX

  • Loading branch information...
1 parent 3972606 commit f448d91694ba2cebd836cc306b5dc53a203efd92 @miyagawa committed Nov 12, 2009
Showing with 11 additions and 16 deletions.
  1. +2 −0 Makefile.PL
  2. +3 −3 lib/Tatsumaki.pm
  3. +1 −1 lib/Tatsumaki/Middleware/BlockingFallback.pm
  4. +4 −9 lib/Tatsumaki/Request.pm
  5. +1 −3 lib/Tatsumaki/Response.pm
View
2 Makefile.PL
@@ -11,6 +11,8 @@ requires 'Plack::Server::AnyEvent', 0.02;
requires 'Plack::Request';
requires 'JSON';
requires 'Text::MicroTemplate';
+requires 'Try::Tiny';
+requires 'parent';
build_requires 'Test::More';
use_test_base;
auto_include_deps;
View
6 lib/Tatsumaki.pm
@@ -24,15 +24,15 @@ Tatsumaki - Non-blocking web framework based on Plack and AnyEvent
use Tatsumaki::Server;
package MainHandler;
- use base qw(Tatsumaki::Handler);
+ use parent qw(Tatsumaki::Handler);
sub get {
my $self = shift;
$self->write("Hello World");
}
package FeedHandler;
- use base qw(Tatsumaki::Handler);
+ use parent qw(Tatsumaki::Handler);
__PACKAGE__->asynchronous(1);
use JSON;
@@ -54,7 +54,7 @@ Tatsumaki - Non-blocking web framework based on Plack and AnyEvent
}
package StreamWriter;
- use base qw(Tatsumaki::Handler);
+ use parent qw(Tatsumaki::Handler);
__PACKAGE__->asynchronous(1);
use AnyEvent;
View
2 lib/Tatsumaki/Middleware/BlockingFallback.pm
@@ -1,6 +1,6 @@
package Tatsumaki::Middleware::BlockingFallback;
use strict;
-use base qw(Plack::Middleware);
+use parent qw(Plack::Middleware);
use Carp ();
use Plack::Util;
use Scalar::Util ();
View
13 lib/Tatsumaki/Request.pm
@@ -1,31 +1,26 @@
package Tatsumaki::Request;
use Encode;
-use Moose;
-use MooseX::NonMoose;
-extends 'Plack::Request';
+use parent qw(Plack::Request);
use Tatsumaki::Response;
-override _build_parameters => sub {
+sub _build_parameters {
my $self = shift;
- my $params = super();
+ my $params = $self->SUPER::_build_parameters();
my $decoded_params = {};
while (my($k, $v) = each %$params) {
$decoded_params->{decode_utf8($k)} = decode_utf8($v);
}
return $decoded_params;
-};
+}
sub new_response {
my $self = shift;
Tatsumaki::Response->new(@_);
}
-no Moose;
-__PACKAGE__->meta->make_immutable;
-
1;
View
4 lib/Tatsumaki/Response.pm
@@ -1,6 +1,4 @@
package Tatsumaki::Response;
-use Moose;
-use MooseX::NonMoose;
-extends 'Plack::Response';
+use parent qw(Plack::Response);
1;

0 comments on commit f448d91

Please sign in to comment.