|1 Create a MARC::Field object and add it||
my $author = MARC::Field->new( 100, "1", " ", a => "Arnosky, Jim." ); $marc->add_fields( $author );
|2 Add the data fields directly, and let add_fields() take care of the objectifying.||
$marc->add_fields( 245, "1", "0", a => "Raccoons and ripe corn /", c => "Jim Arnosky.", );
|3 Same as #2 above, but pass multiple fields of data in anonymous lists||
$marc->add_fields( [ 250, " ", " ", a => "1st ed." ], [ 650, "1", " ", a => "Raccoons." ], );
A brief discussion of why MARC::Record is done the way it is:
o Its built for quick prototyping
One of the areas Perl excels is in allowing the programmer to create easy solutions quickly. MARC::Record is designed along those same lines. You want a program to dump all the 6XX tags in a file? MARC::Record is your friend.
o Its built for extensibility o Its designed around accessor methods
I use method calls everywhere, and I expect calling programs to do the same, rather than accessing internal data directly. If you access an objects hash fields on your own, future releases may break your code.
o Its not built for speed
One of the tradeoffs in using accessor methods is some overhead in the method calls. Is this slow? I dont know, I havent measured. I would suggest that if youre a cycle junkie that you use Benchmark.pm to check to see where your bottlenecks are, and then decide if MARC::Record is for you.
MARC::Field, MARC::Batch, MARC::File::XML, MARC::Charset, MARC::Lint
o perl4lib (<http://perl4lib.perl.org/>)
A mailing list devoted to the use of Perl in libraries.
o Library Of Congress MARC pages (<http://www.loc.gov/marc/>)
The definitive source for all things MARC.
o Understanding MARC Bibliographic (<http://lcweb.loc.gov/marc/umb/>) o Tag Of The Month (<http://www.follettsoftware.com/sub/tag_of_the_month/>)
Follett Software Companys (<http://www.fsc.follett.com/>) monthly discussion of various MARC tags.
o Incorporate MARC.pm in the distribution. o Podify MARC.pm o Allow regexes across the entire tag
Imagine something like this:
my @sears_headings = $marc->tag_grep( qr/Sears/ );
(from Mike ORegan)
o Insert a field in an arbitrary place in the record o Modifying an existing field
Please feel free to email me at <firstname.lastname@example.org>. Im glad to help as best I can, and Im always interested in bugs, suggestions and patches.
An excellent place to look for information, and get quick help, is from the perl4lib mailing list. See <http://perl4lib.perl.org> for more information about this list, and other helpful MARC information.
The MARC::Record development team uses the RT bug tracking system at <http://rt.cpan.org>. If your email is about a bug or suggestion, please report it through the RT system. This is a huge help for the team, and youll be notified of progress as things get fixed or updated. If you prefer not to use the website, you can send your bug to <bug-MARC-Record@rt.cpan.org>
Ideas are things that have been considered, but nobodys actually asked for.
o Create multiple output formats.
These could be ASCII or MarcMaker.
This code may be distributed under the same terms as Perl itself.
Please note that these modules are not products of or supported by the employers of the various contributors to the code.
o Andy Lester o Mike ORegan o Ed Summers o Mike Rylander o Galen Charlton
|perl v5.20.3||MARC::RECORD (3)||2013-10-22|