Missed bits 0.001
Tomas Doran [Sun, 28 Mar 2010 18:36:13 +0000 (19:36 +0100)]
Makefile.PL
README
lib/CatalystX/Debug/ResponseHeaders.pm

index d80949a..5c21263 100644 (file)
@@ -19,7 +19,7 @@ author_requires 'Test::Pod' => '1.14';
 
 author_tests 't/author';
 
-resources repository => 'git://somewhere.com/myproject.git';
+resources repository => 'git://github.com/bobtfish/CatalystX-Debug-ResponseHeaders.git';
 
 if ($Module::Install::AUTHOR) {
     system("pod2text lib/CatalystX/Debug/ResponseHeaders.pm > README")
diff --git a/README b/README
index e69de29..bd650e7 100644 (file)
--- a/README
+++ b/README
@@ -0,0 +1,37 @@
+NAME
+    CatalystX::Debug::ResponseHeaders - Log the full response headers sent
+    by your Catalyst application in debug mode
+
+SYNOPSIS
+        use Catalyst qw/
+            +CatalystX::Debug::ResponseHeaders
+        /;
+
+DESCRIPTION
+    Prints a Text::SimpleTable style table containing all the headers sent
+    from the user's browser to the application for each request when the
+    application is in debug mode.
+
+METHODS
+  log_response_status_line
+    Thie method is wrapped to stop the normal method being called. This
+    suppresses the normal single line response status output.
+
+  log_response_headers
+    This hook method in Catalyst is wrapped to call the "log_headers" in
+    Catalyst method for the request headers.
+
+BUGS
+    None known, but there probably are some.
+
+    Patches are welcome, as are bug reports in the rt.cpan.org bug tracker.
+
+AUTHOR
+    Tomas Doran (t0m) "<bobtfish@bobtfish.net>".
+
+COPYRIGHT & LICENSE
+    Copyright 2010 the above author(s).
+
+    This sofware is free software, and is licensed under the same terms as
+    perl itself.
+
index 5dcba39..530f695 100644 (file)
@@ -1,41 +1,65 @@
 package CatalystX::Debug::ResponseHeaders;
-use Moose;
+use Moose::Role;
 use namespace::autoclean;
 
 our $VERSION = '0.001';
 
-requires 'log_response_headers';
+requires qw/
+    log_response_headers
+    log_response_status_line
+/;
 
-around log_response_headers => sub {
-    my $orig    = shift;
-    my $c       = shift;
-    my $headers = shift;    # an HTTP::Headers instance
+around log_response_status_line => sub {};
 
-    return unless $c->debug;
+around log_response_headers => sub {
+    my ($orig, $c, $headers) = @_;
 
     $c->log_headers('response', $headers);
 };
 
-
 1;
 
 =head1 NAME
 
-CatalystX::Debug::ResponseHeaders - 
+CatalystX::Debug::ResponseHeaders - Log the full response headers sent by your Catalyst application in debug mode
+
+=head1 SYNOPSIS
+
+    use Catalyst qw/
+        +CatalystX::Debug::ResponseHeaders
+    /;
 
 =head1 DESCRIPTION
 
+Prints a L<Text::SimpleTable> style table containing all the headers sent from the
+user's browser to the application for each request when the application is in debug mode.
+
 =head1 METHODS
 
+=head2 log_response_status_line
+
+Thie method is wrapped to stop the normal method being called. This suppresses the
+normal single line response status output.
+
+=head2 log_response_headers
+
+This hook method in L<Catalyst> is wrapped to call the L<Catalyst/log_headers> method
+for the request headers.
+
 =head1 BUGS
 
+None known, but there probably are some.
+
+Patches are welcome, as are bug reports in the L<rt.cpan.org> bug tracker.
+
 =head1 AUTHOR
 
+Tomas Doran (t0m) C<< <bobtfish@bobtfish.net> >>.
+
 =head1 COPYRIGHT & LICENSE
 
-Copyright 2009 the above author(s).
+Copyright 2010 the above author(s).
 
 This sofware is free software, and is licensed under the same terms as perl itself.
 
 =cut
-