summaryrefslogtreecommitdiff
path: root/lib/Net/HTTP/Spore/Role/Debug.pm
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2011-02-03 18:11:31 +0100
committerfranck cuny <franck@lumberjaph.net>2011-07-26 13:19:58 +0200
commitebf98f6927b839015323733636a8e10e22ee6faa (patch)
tree7e728d0f0cbd1b659719f06246293ff5e3b0791e /lib/Net/HTTP/Spore/Role/Debug.pm
parentfix a problem when decoding serialized content when not needed (diff)
downloadnet-http-spore-ebf98f6927b839015323733636a8e10e22ee6faa.tar.gz
trying to finish the trace stuff ..
Diffstat (limited to 'lib/Net/HTTP/Spore/Role/Debug.pm')
-rw-r--r--lib/Net/HTTP/Spore/Role/Debug.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/Net/HTTP/Spore/Role/Debug.pm b/lib/Net/HTTP/Spore/Role/Debug.pm
index 772373a..e178c42 100644
--- a/lib/Net/HTTP/Spore/Role/Debug.pm
+++ b/lib/Net/HTTP/Spore/Role/Debug.pm
@@ -9,6 +9,13 @@ has trace => (
default => sub { $ENV{SPORE_TRACE} ? 1 : 0; }
);
-sub _trace_msg { print STDOUT $_[1]."\n" if $_[0]->trace; }
+has handle => (
+ is => 'rw', isa => 'Object',
+);
+
+sub _trace_msg {
+ my $self = shift;
+ print STDOUT $_[0]."\n" if $self->trace;
+}
1;