491 |
|
|
492 |
This method will also create additional field C<000> with MFN. |
This method will also create additional field C<000> with MFN. |
493 |
|
|
494 |
|
There is also more elaborative way to call C<to_hash> like this: |
495 |
|
|
496 |
|
my $hash = $isis->to_hash({ |
497 |
|
mfn => 42, |
498 |
|
include_empty_subfields => 1, |
499 |
|
}); |
500 |
|
|
501 |
=cut |
=cut |
502 |
|
|
503 |
sub to_hash { |
sub to_hash { |
504 |
my $self = shift; |
my $self = shift; |
505 |
|
|
506 |
|
|
507 |
my $mfn = shift || confess "need mfn!"; |
my $mfn = shift || confess "need mfn!"; |
508 |
|
my $arg; |
509 |
|
|
510 |
|
if (ref($mfn) eq 'HASH') { |
511 |
|
$arg = $mfn; |
512 |
|
$mfn = $arg->{mfn} || confess "need mfn in arguments"; |
513 |
|
} |
514 |
|
|
515 |
# init record to include MFN as field 000 |
# init record to include MFN as field 000 |
516 |
my $rec = { '000' => [ $mfn ] }; |
my $rec = { '000' => [ $mfn ] }; |
676 |
|
|
677 |
=item 0.20 |
=item 0.20 |
678 |
|
|
679 |
Added C<< $isis->mfn >> and support for repeatable subfields |
Added C<< $isis->mfn >>, support for repeatable subfields and |
680 |
|
C<< $isis->to_hash({ mfn => 42, ... }) >> calling convention |
681 |
|
|
682 |
=back |
=back |
683 |
|
|