1 |
package WebPAC::Normalize; |
package WebPAC::Normalize; |
2 |
use Exporter 'import'; |
use Exporter 'import'; |
3 |
@EXPORT = qw/ |
our @EXPORT = qw/ |
4 |
_set_rec _set_lookup |
_set_rec _set_lookup |
5 |
_set_load_row |
_set_load_row |
6 |
_get_ds _clean_ds |
_get_ds _clean_ds |
24 |
|
|
25 |
get set |
get set |
26 |
count |
count |
27 |
|
|
28 |
/; |
/; |
29 |
|
|
30 |
use warnings; |
use warnings; |
38 |
# debugging warn(s) |
# debugging warn(s) |
39 |
my $debug = 0; |
my $debug = 0; |
40 |
|
|
41 |
|
use WebPAC::Normalize::ISBN; |
42 |
|
push @EXPORT, ( 'isbn_10', 'isbn_13' ); |
43 |
|
|
44 |
=head1 NAME |
=head1 NAME |
45 |
|
|
105 |
die "need row argument" unless ($arg->{row}); |
die "need row argument" unless ($arg->{row}); |
106 |
die "need normalisation argument" unless ($arg->{rules}); |
die "need normalisation argument" unless ($arg->{rules}); |
107 |
|
|
|
# FIXME load this conditionally |
|
|
# use WebPAC::Normalize::ISBN; |
|
|
|
|
108 |
no strict 'subs'; |
no strict 'subs'; |
109 |
_set_lookup( $arg->{lookup} ) if defined($arg->{lookup}); |
_set_lookup( $arg->{lookup} ) if defined($arg->{lookup}); |
110 |
_set_rec( $arg->{row} ); |
_set_rec( $arg->{row} ); |