5dcba39d3812b902cd7d58f10f0d392eda8a4461
[catagits/CatalystX-Debug-ResponseHeaders.git] / lib / CatalystX / Debug / ResponseHeaders.pm
1 package CatalystX::Debug::ResponseHeaders;
2 use Moose;
3 use namespace::autoclean;
4
5 our $VERSION = '0.001';
6
7 requires 'log_response_headers';
8
9 around log_response_headers => sub {
10     my $orig    = shift;
11     my $c       = shift;
12     my $headers = shift;    # an HTTP::Headers instance
13
14     return unless $c->debug;
15
16     $c->log_headers('response', $headers);
17 };
18
19
20 1;
21
22 =head1 NAME
23
24 CatalystX::Debug::ResponseHeaders - 
25
26 =head1 DESCRIPTION
27
28 =head1 METHODS
29
30 =head1 BUGS
31
32 =head1 AUTHOR
33
34 =head1 COPYRIGHT & LICENSE
35
36 Copyright 2009 the above author(s).
37
38 This sofware is free software, and is licensed under the same terms as perl itself.
39
40 =cut
41