Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

no MooseX

  • Loading branch information...
commit f448d91694ba2cebd836cc306b5dc53a203efd92 1 parent 3972606
Tatsuhiko Miyagawa authored
2  Makefile.PL
View
@@ -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;
6 lib/Tatsumaki.pm
View
@@ -24,7 +24,7 @@ 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;
@@ -32,7 +32,7 @@ Tatsumaki - Non-blocking web framework based on Plack and AnyEvent
}
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;
2  lib/Tatsumaki/Middleware/BlockingFallback.pm
View
@@ -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 ();
13 lib/Tatsumaki/Request.pm
View
@@ -1,15 +1,13 @@
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) {
@@ -17,15 +15,12 @@ override _build_parameters => sub {
}
return $decoded_params;
-};
+}
sub new_response {
my $self = shift;
Tatsumaki::Response->new(@_);
}
-no Moose;
-__PACKAGE__->meta->make_immutable;
-
1;
4 lib/Tatsumaki/Response.pm
View
@@ -1,6 +1,4 @@
package Tatsumaki::Response;
-use Moose;
-use MooseX::NonMoose;
-extends 'Plack::Response';
+use parent qw(Plack::Response);
1;
Please sign in to comment.
Something went wrong with that request. Please try again.