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/UnknownPlug.pm

    r9853 r10218  
    5858use BasPlug;
    5959use parsargv;
     60#$%^
     61use parse2;
     62
    6063
    6164
     
    9497
    9598sub new {
    96     my ($class) = @_;
    97     my $self = new BasPlug ($class, @_);
    98     $self->{'plugin_type'} = "UnknownPlug";
    99     # 14-05-02 To allow for proper inheritance of arguments - John Thompson
    100     my $option_list = $self->{'option_list'};
    101     push( @{$option_list}, $options );
    102 
    103     if (!parsargv::parse(\@_,
    104              q^assoc_field/.*/^, \$self->{'assoc_field'},
    105              q^file_format/.*/^, \$self->{'file_format'},
    106              q^mime_type/.*/^, \$self->{'mime_type'},
    107              q^process_extension/.*/^, \$self->{'process_extension'},
    108              "allow_extra_options")) {
    109     print STDERR "\nIncorrect options passed to UnknownPlug, check your collect.cfg configuration file\n";
    110     $self->print_txt_usage("");  # Use default resource bundle
    111         die "\n";
    112     }
     99    my ($class) = shift (@_);
     100    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
     101    push(@$pluginlist, $class);
     102
     103    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
     104    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
     105
     106    my $self = (defined $hashArgOptLists)? new BasPlug($pluginlist,$inputargs,$hashArgOptLists): new BasPlug($pluginlist,$inputargs);
    113107
    114108    # "-process_extension" is a simpler alternative to -process_exp for non-regexp people
Note: See TracChangeset for help on using the changeset viewer.