Re: Moose based Perl library for MARC records

[email protected] (Frédéric DEMIANS)
Newsgroups perl.perl4lib
Message-ID <[email protected]>
Thanks for your feedback.

> A couple of questions and comments (some left over from the much earlier
> conversion from MARC.pm to the MARC::Record family):
>
> 1. Do you ever expect someone to use both your modules and MARC::Record
> at the same time? If so, you need to be extra careful about name
> overlaps.

No. Marc::Record is a MARC::Record replacement. This is how I use it and 
all Marc:: related subclasses expect a Marc::Record or a subclass of 
Marc::Record.

I do a lot of data conversion using Marc::Record. I've used previously 
MARC::Record. There isn't so much differences, indeed. Marc::Record is 
simpler than MARC::Record. It's just an ArrayRef of Marc::Field objects. 
Similarly,  Marc::Field is just a ArrayRef of ArrayRef which is simpler 
to manipulate than MARC::Field data structure (personal point of view).

For example, a field creation is:

   $field = Marc::Field::Std->new(
     tag => '245',
     subf => [ [ a => 'My title,'], [ b => 'my remainder of title' ] ]
   );

and you get instant number of subfields with:

   @{$field->subf} (in scalar context)


> 2. MARC::Record also handles data as objects - just not the same objects
> as Moose. I think choices like MARC::OO and MARC::Object might be
> confusing to new users in the future.

I also tend not to like much saying explicitly an object is object or a 
Moose object...

--
Frédéric
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.