>Bryan wrote: Your modifications look interesting >I would suggest you post about them on the Perl4Lib discussion list
Bryan, Following your suggestion I'm copying our recent corresponence on this to the list. Like you I need a bit of time to implment my ideas on this - we're just about to launch into a major migration after selection of a new ILMS. My intention is to reimplement your AACR2 043, 245, 260, 300 et al. field and subfield checks via a modified version of Lint.pm with an extended rule set (this will involve modification to the parsing of rules) + code to indicate the next subfield, etc. As far as possible only cross-field checks would be implemented via the custom check_xxx routines (which would pass a Record object reference for this purpose). This should facilitate maintenance/extension of the detailed AACR data checking you've contributed. When I've implemented this I'll post it to the list. Examples of the lines I'm thinking along (based on your checks): [Field level rules for 245] MandatorySubfields=a FirstSubfield=a LastChars='.' [NextSubfield rules] LastCharsBeforeSubfield=c='/' # 245 LastCharsBeforeSubfield=a=' ;' # 260 LastCharsBeforeSubfield=c=',' # 260 LastCharsBeforeSubfield=b=' :' # 300 LastCharsBeforeSubfield=c=' ;' # 300 LastCharsBeforeSubfield=e=' +' # 300 [SubfieldLength rules] MinLength=7 # 043 MaxLength=7 # 043 Regards, Ian _____________________________________________ Ian Hamilton Library Systems Administrator European Commission - Directorate General for Education and Culture EAC D3 - Central Library Unit * +32-2-295.24.60 (direct phone) * +32-2-299.91.89 (fax) * http://europa.eu.int/eclas/ -----Original Message----- From: Bryan Baldus [mailto:[EMAIL PROTECTED] Sent: Monday, November 08, 2004 4:53 PM To: HAMILTON Ian (EAC); Bryan Baldus Cc: BREAM Carol (EAC) Subject: RE: Customising MARC::Lint & LintAdditions/ErrorChecks Your modifications look interesting. I would suggest you post about them on the Perl4Lib discussion list or contact Andy Lester? (and Ed Summers?) directly to see about having the changes to Lint integrated into the official version. I am interested in joining the MARC::Record developers, but am still waiting for more information about that. I've been working on other things lately, so I haven't had time yet to rework Lintadditions to fit into Lint. Perhaps by the end of the year. Thank you, Bryan Baldus Cataloger Quality Books Inc. The Best of America's Independent Presses [EMAIL PROTECTED] -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, November 05, 2004 10:15 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Customising MARC::Lint & LintAdditions/ErrorChecks Bryan, I've been working on customisng Lint.pm via a package I've called MyLint - quite a few of the checks are based on the data validation logic in your Lintadditions/ErrorChecks packages. This is work in progress, but I'm already keeping you informed in case the OOP perl approach is relevant to your work. My implementation approach has been to modify Lint.pm as follows: sub check_record - I added a call a routine (for every field) to do leading/trailing space, repeated spaces, commas, etc. checks (aacr_checker: defined in MyLint.pm - the name is not very logical - just the first thing I thought of) #BEGIN <MODIF> my $aacr_checker = 'aacr_check'; if ( $self->can( $aacr_checker ) ) { $self->$aacr_checker($tagno,$code,$data); } #END <MODIF> - two modifs to the calling of custom check_XXX functions: (NB The first modifn. is only necessary if no rules have been defined for these control fields, so this should disappear when I've had time to look more closely at your control field rules) 1) Repositioned before the following line my $tagrules = $rules->{$tagno} or next; within loop to allow e.g. check_008 2) I've added an additional argument to the check_xxx calls: the MARC::Record object ref to allow cross-field checking, while remaining within the Lint structure. This allows you to do $record->filed('yyy') calls within the check_xxx routine. # <MODIF> # call custom checks here to allow checks on fields without rules # add MARC::Record object ref to allow cross-field checking # Check to see if a check_xxx() function exists, and call it on the field if it does my $checker = "check_$tagno"; if ( $self->can( $checker ) ) { $self->$checker($marc, $field); } # </MODIF> You'll find attached: marclint.pl which uses a MARC::MyLint object (inheriting from the Lint class) to do the checking and write out an HTML report Lint.pm (modifications are indicated as shown above) MyLint.pm Best Regards, Ian Hamilton (I'm on holiday until Nov. 9th so may not be able to respond quickly to emails before then)