| 1 | package MARC::Moose::Field::Control; | ||||||||||
| 2 | # ABSTRACT: Control Marc field (tag < 010) | ||||||||||
| 3 | 4 | $MARC::Moose::Field::Control::VERSION = '1.0.46'; | |||||||||
| 4 | 4 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 4 | extends 'MARC::Moose::Field'; | |||||||||
| 7 | |||||||||||
| 8 | 4 | has value => ( is => 'rw', isa => 'Str' ); | |||||||||
| 9 | |||||||||||
| 10 | override 'as_formatted' => sub { | ||||||||||
| 11 | 0 | ▶ | my $self = shift; | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 12 | |||||||||||
| 13 | 0 | join ' ', ( $self->tag, $self->value ); | |||||||||
| 14 | 4 | }; | |||||||||
| 15 | |||||||||||
| 16 | |||||||||||
| 17 | override 'clone' => sub { | ||||||||||
| 18 | 0 | ▶ | my ($self, $tag) = @_; | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||
| 19 | 0 | my $field = MARC::Moose::Field::Control->new( tag => $self->tag ); | |||||||||
| 20 | 0 | ▶ | $field->tag($tag) if $tag; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 21 | 0 | my $value = $self->value . ''; | |||||||||
| 22 | 0 | $field->value($value); | |||||||||
| 23 | 0 | return $field; | |||||||||
| 24 | 4 | }; | |||||||||
| 25 | |||||||||||
| 26 | |||||||||||
| 27 | 4 | __PACKAGE__->meta->make_immutable; | |||||||||
| 28 | |||||||||||
| 29 | 4 | 1; | |||||||||
| 30 | |||||||||||
| 31 | __END__ | ||||||||||
| 32 | |||||||||||
| 33 | =pod | ||||||||||
| 34 | |||||||||||
| 35 | =encoding UTF-8 | ||||||||||
| 36 | |||||||||||
| 37 | =head1 NAME | ||||||||||
| 38 | |||||||||||
| 39 | MARC::Moose::Field::Control - Control Marc field (tag < 010) | ||||||||||
| 40 | |||||||||||
| 41 | =head1 VERSION | ||||||||||
| 42 | |||||||||||
| 43 | version 1.0.46 | ||||||||||
| 44 | |||||||||||
| 45 | =head1 AUTHOR | ||||||||||
| 46 | |||||||||||
| 47 | Frédéric Demians <f.demians@tamil.fr> | ||||||||||
| 48 | |||||||||||
| 49 | =head1 COPYRIGHT AND LICENSE | ||||||||||
| 50 | |||||||||||
| 51 | This software is copyright (c) 2022 by Frédéric Demians. | ||||||||||
| 52 | |||||||||||
| 53 | This is free software; you can redistribute it and/or modify it under | ||||||||||
| 54 | the same terms as the Perl 5 programming language system itself. | ||||||||||
| 55 | |||||||||||
| 56 | =cut | ||||||||||