Ignore:
Timestamp:
2005-07-06T15:27:45+12:00 (19 years ago)
Author:
kjdon
Message:

Jeffrey's new parsing modifications, committed approx 6 July, 15.16

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/plugins/RecPlug.pm

    r10156 r10218  
    131131
    132132my ($self);
     133
    133134sub new {
    134     my $class = shift (@_);
    135    
    136     # $self is global for use within subroutines called by XML::Parser
    137     $self = new BasPlug ($class, @_);
    138    
    139     # 14-05-02 To allow for proper inheritance of arguments - John Thompson
    140     my $option_list = $self->{'option_list'};
    141     push( @{$option_list}, $options );
    142 
    143     if (!parsargv::parse(\@_,
    144              q^use_metadata_files^, \$self->{'use_metadata_files'},
    145              q^recheck_directories^, \$self->{'recheck_directories'},
    146              "allow_extra_options")) {
    147     print STDERR "\nRecPlug uses an incorrect option.\n";
    148     print STDERR "Check your collect.cfg configuration file.\n\n";
    149     $self->print_txt_usage("");  # Use default resource bundle
    150     die "\n";
    151     }
    152    
     135    my ($class) = shift (@_);
     136    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
     137    push(@$pluginlist, $class);
     138
     139    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
     140    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
     141
     142    $self = (defined $hashArgOptLists)? new BasPlug($pluginlist,$inputargs,$hashArgOptLists): new BasPlug($pluginlist,$inputargs);
    153143    if ($self->{'use_metadata_files'}) {
    154144    # create XML::Parser object for parsing metadata.xml files
     
    157147                            'Doctype' => \&Doctype
    158148                            });
     149
    159150    $self->{'parser'} = $parser;
    160151    $self->{'in_filename'} = 0;
    161152    }
    162 
     153   
    163154    $self->{'subdir_extrametakeys'} = {};
    164155
     
    425416    # Next add metadata read in XML files (if it is supplied)
    426417    if ($additionalmetadata == 1) {
     418       
    427419        my ($filespec, $mdref);
    428420        foreach $filespec (@extrametakeys) {
     
    498490sub StartTag {
    499491    my ($expat, $element) = @_;
    500    
     492
    501493    if ($element eq "FileSet") {
    502494    $self->{'saved_targets'} = [];
Note: See TracChangeset for help on using the changeset viewer.