Lines 46-52
sub split_callnumber {
Link Here
|
46 |
# lccn examples: 'HE8700.7 .P6T44 1983', 'BS2545.E8 H39 1996'; |
46 |
# lccn examples: 'HE8700.7 .P6T44 1983', 'BS2545.E8 H39 1996'; |
47 |
my @lines = Library::CallNumber::LC->new($cn_item)->components(); |
47 |
my @lines = Library::CallNumber::LC->new($cn_item)->components(); |
48 |
unless ( scalar @lines && defined $lines[0] ) { |
48 |
unless ( scalar @lines && defined $lines[0] ) { |
49 |
Koha::Logger->get->debug( sprintf( 'regexp failed to match string: %s', $cn_item ) ); |
49 |
Koha::Logger->get->debug( sprintf( 'regexp failed to match string: %s', $cn_item // q{} ) ); |
50 |
@lines = $cn_item; # if no match, just use the whole string. |
50 |
@lines = $cn_item; # if no match, just use the whole string. |
51 |
} |
51 |
} |
52 |
my $LastPiece = pop @lines; |
52 |
my $LastPiece = pop @lines; |