| 1 | package MARC::Validator::Filter::Plugin::RDA; | ||
| 2 | |||
| 3 | 3 | ▶ | use base qw(MARC::Validator::Filter::Abstract); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | use strict; | ||
| 5 | use warnings; | ||
| 6 | |||
| 7 | our $VERSION = 0.01; | ||
| 8 | |||
| 9 | sub name { | ||
| 10 | my $self = shift; | ||
| 11 | |||
| 12 | return 'rda'; | ||
| 13 | } | ||
| 14 | |||
| 15 | sub process { | ||
| 16 | my ($self, $marc_record) = @_; | ||
| 17 | |||
| 18 | my $field_040 = $marc_record->field('040'); | ||
| 19 | if (! defined $field_040) { | ||
| 20 | return; | ||
| 21 | } | ||
| 22 | |||
| 23 | my $desc_conventions = $field_040->subfield('e'); | ||
| 24 | if (! defined $desc_conventions) { | ||
| 25 | return; | ||
| 26 | } | ||
| 27 | |||
| 28 | if ($desc_conventions ne 'rda') { | ||
| 29 | return; | ||
| 30 | } | ||
| 31 | |||
| 32 | return 'rda'; | ||
| 33 | } | ||
| 34 | |||
| 35 | 1; | ||
| 36 | |||
| 37 | __END__ | ||