mixed in enumerable to result set class. added result set method to get the size...
[zcc.git] / examples / linter.pl
blob90ca4fc2102d585ad90bac7b03630859e3c370cb
1 #!/usr/bin/perl
3 use strict;
4 ##
5 use MARC::Record;
6 use MARC::File::XML;
7 use MARC::File::USMARC;
8 use MARC::Lint;
11 #print @ARGV[0];
12 print "\n";
14 my $lint = MARC::Lint->new();
17 my $file = MARC::Record->new_from_xml( @ARGV[0] );
19 #print $file->as_formatted;
20 #my $file = MARC::File::USMARC->in( 'temp_lint.mrc' );
21 #print $record->as_formatted;
23 #print "title: ", $title;
24 #print $record->as_formatted;
26 $lint->check_record($file);
27 my @warnings = $lint->warnings();
30 foreach my $warning ( @warnings ) {
31 print $warning . "\n";
36 #while ( my $marc = $file->next() ) {
37 # $lint->check_record( $marc );
39 # Print the title tag
40 # print $marc->title, "\n";
42 # Print the errors that were found
43 # print join( "\n", $lint->warnings ), "\n";
44 # } # while
47 #print "Hello, world!\n";
48 #@input = @ARGV;
49 #print "\nthis\n";
50 #print "\ninput[0]", $input[0], "\n\n";