Changeset 10218 for trunk/gsdl/perllib/plugins/RecPlug.pm
- Timestamp:
- 2005-07-06T15:27:45+12:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/RecPlug.pm
r10156 r10218 131 131 132 132 my ($self); 133 133 134 sub 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); 153 143 if ($self->{'use_metadata_files'}) { 154 144 # create XML::Parser object for parsing metadata.xml files … … 157 147 'Doctype' => \&Doctype 158 148 }); 149 159 150 $self->{'parser'} = $parser; 160 151 $self->{'in_filename'} = 0; 161 152 } 162 153 163 154 $self->{'subdir_extrametakeys'} = {}; 164 155 … … 425 416 # Next add metadata read in XML files (if it is supplied) 426 417 if ($additionalmetadata == 1) { 418 427 419 my ($filespec, $mdref); 428 420 foreach $filespec (@extrametakeys) { … … 498 490 sub StartTag { 499 491 my ($expat, $element) = @_; 500 492 501 493 if ($element eq "FileSet") { 502 494 $self->{'saved_targets'} = [];
Note:
See TracChangeset
for help on using the changeset viewer.