]> Dogcows Code - chaz/p5-File-KDBX/blobdiff - lib/File/KDBX/Error.pm
Add maintenance methods
[chaz/p5-File-KDBX] / lib / File / KDBX / Error.pm
index 86442f3bdc306a071a2101cb462e6f3b9dbfbd2b..d4a01b92afde4c0d37c188d985f136b18e2502e2 100644 (file)
@@ -24,7 +24,7 @@ BEGIN {
 
     my $debug = $ENV{DEBUG};
     $debug = looks_like_number($debug) ? (0 + $debug) : ($debug ? 1 : 0);
-    *DEBUG = $debug == 1 ? sub() { 1 } :
+    *_DEBUG = $debug == 1 ? sub() { 1 } :
              $debug == 2 ? sub() { 2 } :
              $debug == 3 ? sub() { 3 } :
              $debug == 4 ? sub() { 4 } : sub() { 0 };
@@ -147,8 +147,8 @@ sub type     { $_[0]->details->{type} // '' }
 
 Stringify an error.
 
-This does not contain a stack trace, but you can set the C<DEBUG> environment
-variable to truthy to stringify the whole error object.
+This does not contain a stack trace, but you can set the C<DEBUG> environment variable to at least 2 to
+stringify the whole error object.
 
 =cut
 
@@ -158,7 +158,7 @@ sub to_string {
     my $self = shift;
     my $msg = "$self->{trace}[0]";
     $msg .= '.' if $msg !~ /[\.\!\?]$/;
-    if (2 <= DEBUG) {
+    if (2 <= _DEBUG) {
         require Data::Dumper;
         local $Data::Dumper::Indent = 1;
         local $Data::Dumper::Quotekeys = 0;
This page took 0.019294 seconds and 4 git commands to generate.