summary refs log tree commit diff
path: root/lib/Net/HTTP
diff options
context:
space:
mode:
authorniko <nikomomo@gmail.com>2011-03-17 14:01:01 +0100
committerfranck cuny <franck@lumberjaph.net>2011-07-26 13:19:59 +0200
commit09f0ab1ad92241bf703f20eb660f83ba8da24be8 (patch)
tree62f6840001b3faa99699dcb0951a2d7a856aaba4 /lib/Net/HTTP
parentlog request and respose (diff)
downloadnet-http-spore-09f0ab1ad92241bf703f20eb660f83ba8da24be8.tar.gz
set a default value to 0 for trace attribute in debug role
Diffstat (limited to 'lib/Net/HTTP')
-rw-r--r--lib/Net/HTTP/Spore/Role/Debug.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Net/HTTP/Spore/Role/Debug.pm b/lib/Net/HTTP/Spore/Role/Debug.pm
index e2d2fa1..e229229 100644
--- a/lib/Net/HTTP/Spore/Role/Debug.pm
+++ b/lib/Net/HTTP/Spore/Role/Debug.pm
@@ -9,10 +9,10 @@ has trace => (
     lazy    => 1,
     default => sub {
         my $self      = shift;
-        my $trace_env = $ENV{SPORE_TRACE};
-        my @stack = caller; use YAML; warn Dump \@stack;
+        my $trace_env = $ENV{SPORE_TRACE} || 0;
+        #my @stack = caller; use YAML; warn Dump \@stack;
         my ($fh, $level);
-        if ( defined($trace_env) && ( $trace_env =~ /(\d)=(.+)$/ ) ) {
+        if ( $trace_env =~ /(\d)=(.+)$/ ) {
             $level = $1;
             $fh = IO::File->new( $2, 'w' )
               or die("Cannot open trace file $1");