> -----Original Message-----
>
> > I now wonder if this code would have greater utility as a module on
> > CPAN.
>
> Yes, please! (You're not BRICAS on cpan.org, are you?)
Yes, I am BRICAS on CPAN...is that a bad thing? :)
> I would recommend putting it in the MARC::* namespace, since it's
> specific to MARC records -- maybe MARC::Transform::NACO or some such.
>
> A class hierarchy rooted at MARC:: Transform might be useful, if (for
> example) people wanted to apply arbitrary transformations to a single
> record:
>
> my @records = ... some MARC::Record objects ... ;
> my @transforms = (
> MARC::Transform::Delete9xx->new,
> MARC::Transform::StripInitialArticles->new,
> some_other_transforms(),
> );
> foreach my $t (@ transforms) {
> $t->transform($_) foreach @records;
> }
The current behavior is currently to take a string in, normalize, then
output it. There isn't necessarily a defined behavior on a MARC record.
Also, as far as "transforms" are concerned, the decode() method in
MARC::File::USMARC can take a filter sub as a second parameter. So, I'm
still not 100% sure it should be a MARC-specific module rather than a
general normalizing module.
Perhaps we need to explore exactly how a transform would interact with a
MARC::Record object if we wish to go in that direction.
-Brian Cassidy ( [EMAIL PROTECTED] )
http://www.gordano.com - Messaging for educators.