--- trunk/lib/WebPAC/Normalize.pm 2006/12/10 12:45:11 786 +++ trunk/lib/WebPAC/Normalize.pm 2007/04/01 21:47:38 810 @@ -21,6 +21,7 @@ split_rec_on get set + count /; use warnings; @@ -41,11 +42,11 @@ =head1 VERSION -Version 0.25 +Version 0.26 =cut -our $VERSION = '0.25'; +our $VERSION = '0.26'; =head1 SYNOPSIS @@ -661,6 +662,7 @@ if ($f eq '*') { delete( $marc_record->[ $marc_record_offset ] ); + warn "## full marc_record = ", dump( @{ $marc_record }), $/ if ($debug > 1); } else { @@ -699,7 +701,6 @@ $marc_record->[ $marc_record_offset ] = $marc; } - warn "## full marc_record = ", dump( @{ $marc_record }), $/ if ($debug > 1); } @@ -1272,7 +1273,7 @@ sub set { my ($k,$v) = @_; - warn "## set ( $k => ", dump($v), " )", $/; + warn "## set ( $k => ", dump($v), " )", $/ if ( $debug ); $hash->{$k} = $v; }; @@ -1285,10 +1286,22 @@ sub get { my $k = shift || return; my $v = $hash->{$k}; - warn "## get $k = ", dump( $v ), $/; + warn "## get $k = ", dump( $v ), $/ if ( $debug ); return $v; } +=head2 count + + if ( count( @result ) == 1 ) { + # do something if only 1 result is there + } + +=cut + +sub count { + warn "## count ",dump(@_),$/ if ( $debug ); + return @_ . ''; +} # END 1;