[Catalyst-commits] r10231 - Catalyst-Engine-Embeddable/trunk/lib/Catalyst/Engine

t0m at dev.catalyst.perl.org t0m at dev.catalyst.perl.org
Fri May 22 00:50:15 GMT 2009


Author: t0m
Date: 2009-05-22 00:50:13 +0000 (Fri, 22 May 2009)
New Revision: 10231

Modified:
   Catalyst-Engine-Embeddable/trunk/lib/Catalyst/Engine/Embeddable.pm
Log:
Chop extra whitespace out

Modified: Catalyst-Engine-Embeddable/trunk/lib/Catalyst/Engine/Embeddable.pm
===================================================================
--- Catalyst-Engine-Embeddable/trunk/lib/Catalyst/Engine/Embeddable.pm	2009-05-21 21:54:38 UTC (rev 10230)
+++ Catalyst-Engine-Embeddable/trunk/lib/Catalyst/Engine/Embeddable.pm	2009-05-22 00:50:13 UTC (rev 10231)
@@ -1,77 +1,75 @@
-{   package Catalyst::Engine::Embeddable;
+package Catalyst::Engine::Embeddable;
 
-    our $VERSION = '0.0.1';
-    use base qw(Catalyst::Engine);
-    use strict;
-    use warnings;
-    use URI;
-    use HTTP::Body;
-    use HTTP::Response;
+our $VERSION = '0.0.1';
+use base qw(Catalyst::Engine);
+use strict;
+use warnings;
+use URI;
+use HTTP::Body;
+use HTTP::Response;
 
-    sub prepare_request {
-        my ($self, $c, $req, $res_ref) = @_;
-        $c->req->{_engine_embeddable}{req} = $req;
-        $c->req->{_engine_embeddable}{res} = $res_ref;
-        $c->req->method($req->method);
-    }
+sub prepare_request {
+    my ($self, $c, $req, $res_ref) = @_;
+    $c->req->{_engine_embeddable}{req} = $req;
+    $c->req->{_engine_embeddable}{res} = $res_ref;
+    $c->req->method($req->method);
+}
 
-    sub prepare_headers {
-        my ($self, $c) = @_;
-        $c->req->{_engine_embeddable}{req}->scan
-          (sub {
-               my ($name, $value) = @_;
-               $c->req->header($name, $value);
-           });
-    }
+sub prepare_headers {
+    my ($self, $c) = @_;
+    $c->req->{_engine_embeddable}{req}->scan
+      (sub {
+           my ($name, $value) = @_;
+           $c->req->header($name, $value);
+       });
+}
 
-    sub prepare_path {
-        my ($self, $c) = @_;
+sub prepare_path {
+    my ($self, $c) = @_;
 
-        my $uri = $c->req->{_engine_embeddable}{req}->uri();
-        my $base = $uri->clone; $base->path('/');
+    my $uri = $c->req->{_engine_embeddable}{req}->uri();
+    my $base = $uri->clone; $base->path('/');
 
-        $c->req->uri($uri);
-        $c->req->base($base);
-    }
+    $c->req->uri($uri);
+    $c->req->base($base);
+}
 
-    sub prepare_query_parameters {
-        my ($self, $c) = @_;
-        my %params = $c->req->{_engine_embeddable}{req}->uri->query_form;
-        $c->req->query_parameters(\%params);
-    }
+sub prepare_query_parameters {
+    my ($self, $c) = @_;
+    my %params = $c->req->{_engine_embeddable}{req}->uri->query_form;
+    $c->req->query_parameters(\%params);
+}
 
-    sub prepare_body {
-        my ($self, $c) = @_;
-        my $req = $c->req->{_engine_embeddable}{req};
-        $req->content_length(0) unless $req->content_length;
+sub prepare_body {
+    my ($self, $c) = @_;
+    my $req = $c->req->{_engine_embeddable}{req};
+    $req->content_length(0) unless $req->content_length;
 
-        $c->req->content_encoding($req->content_encoding);
-        $c->req->content_type($req->content_type);
-        $c->req->content_length($req->content_length);
+    $c->req->content_encoding($req->content_encoding);
+    $c->req->content_type($req->content_type);
+    $c->req->content_length($req->content_length);
 
-        my $http_body = HTTP::Body->new($c->req->content_type, $c->req->content_length);
-        $http_body->add($req->content());
-        $c->req->{_body} = $http_body;
-    }
+    my $http_body = HTTP::Body->new($c->req->content_type, $c->req->content_length);
+    $http_body->add($req->content());
+    $c->req->{_body} = $http_body;
+}
 
-    sub finalize_headers {
-        my ($self, $c) = @_;
+sub finalize_headers {
+    my ($self, $c) = @_;
 
-        my $response = HTTP::Response->new($c->res->status,
-                                           'Catalyst-Engine-Embeddable',
-                                           $c->res->headers);
+    my $response = HTTP::Response->new($c->res->status,
+                                       'Catalyst-Engine-Embeddable',
+                                       $c->res->headers);
 
-        ${$c->req->{_engine_embeddable}{res}} = $response;
-    }
+    ${$c->req->{_engine_embeddable}{res}} = $response;
+}
 
-    sub finalize_body {
-        my ($self, $c) = @_;
-        ${$c->req->{_engine_embeddable}{res}}->content($c->res->body());
-    }
+sub finalize_body {
+    my ($self, $c) = @_;
+    ${$c->req->{_engine_embeddable}{res}}->content($c->res->body());
+}
 
-};
 1;
-
 __END__
 
 =head1 NAME
@@ -124,7 +122,7 @@
 
 =item $engine->prepare_request($c, $http_request, $http_response_ret_ref)
 
-This method is overrided in order to store the request and the
+This method is overriden in order to store the request and the
 response in $c as to continue the processing later. The scalar ref
 here will be used to set the response object, as there is no other way
 to obtain the response.
@@ -172,6 +170,8 @@
 
 Daniel Ruoso C<daniel at ruoso.com>
 
+Currently maintained by Tomas Doran (t0m) C<bobtfish at bobtfish.net>
+
 =head1 BUG REPORTS
 
 Please submit all bugs regarding C<Catalyst::Engine::Embeddable> to




More information about the Catalyst-commits mailing list