Lines 698-704
sub _isbn_cleanup {
Link Here
|
698 |
return NormalizeISBN( |
698 |
return NormalizeISBN( |
699 |
{ |
699 |
{ |
700 |
isbn => $isbn, |
700 |
isbn => $isbn, |
701 |
format => 'ISBN-10', |
|
|
702 |
strip_hyphens => 1, |
701 |
strip_hyphens => 1, |
703 |
} |
702 |
} |
704 |
) if $isbn; |
703 |
) if $isbn; |
Lines 734-744
sub NormalizeISBN {
Link Here
|
734 |
return unless $string; |
733 |
return unless $string; |
735 |
|
734 |
|
736 |
my $isbn = Business::ISBN->new($string); |
735 |
my $isbn = Business::ISBN->new($string); |
737 |
|
|
|
738 |
if ( $isbn && $isbn->is_valid() ) { |
736 |
if ( $isbn && $isbn->is_valid() ) { |
739 |
|
737 |
|
740 |
if ( $format eq 'ISBN-10' ) { |
738 |
if ( $format eq 'ISBN-10' ) { |
741 |
$isbn = $isbn->as_isbn10(); |
739 |
$isbn = $isbn->as_isbn10(); |
742 |
} |
740 |
} |
743 |
elsif ( $format eq 'ISBN-13' ) { |
741 |
elsif ( $format eq 'ISBN-13' ) { |
744 |
$isbn = $isbn->as_isbn13(); |
742 |
$isbn = $isbn->as_isbn13(); |
745 |
- |
|
|