r1612@llin: dpavlin | 2007-11-12 12:17:17 +0100
authorDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 12 Nov 2007 11:17:19 +0000 (11:17 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 12 Nov 2007 11:17:19 +0000 (11:17 +0000)
 fixed debug levels: now tests run with -d will display
 own diag messages, while -d -d will be 1st level of
 debug for WebPAC, and so on...

git-svn-id: svn+ssh://mjesec/home/dpavlin/svn/webpac2/trunk@1037 07558da8-63fa-0310-ba24-9fe276d99e06

lib/WebPAC/Normalize.pm
t/3-normalize-marc.t

index 084b3ea..e7f7e9b 100644 (file)
@@ -27,11 +27,11 @@ use strict;
 
 #use base qw/WebPAC::Common/;
 use Data::Dump qw/dump/;
-use Storable qw/dclone/;
 use Carp qw/confess/;
 
 # debugging warn(s)
 my $debug = 0;
+_debug( $debug );
 
 # FIXME
 use WebPAC::Normalize::ISBN;
@@ -263,6 +263,7 @@ sub _debug {
        warn "debug level $l",$/ if ($l > 0);
        $debug = $l;
        $WebPAC::Normalize::MARC::debug = $debug;
+warn "#### MARC::debug = ",dump($WebPAC::Normalize::MARC::debug);
 }
 
 =head1 Functions to create C<data_structure>
index 0b7ea6a..825c77f 100755 (executable)
@@ -11,6 +11,8 @@ BEGIN {
        use_ok( 'WebPAC::Normalize::MARC' );
 }
 
+_debug( $debug - 1 ) if $debug > 1;
+
 my $rec = {
        '225' => [{
                'a' => 'a-1-1',