summaryrefslogtreecommitdiff
path: root/lib/Net/HTTP/Spore/Role/Debug.pm
diff options
context:
space:
mode:
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;