From ebf98f6927b839015323733636a8e10e22ee6faa Mon Sep 17 00:00:00 2001 From: franck cuny Date: Thu, 3 Feb 2011 18:11:31 +0100 Subject: trying to finish the trace stuff .. --- lib/Net/HTTP/Spore/Role/Debug.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib/Net/HTTP/Spore/Role/Debug.pm') 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; -- cgit v1.2.3