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

    r8121 r10218  
    7171
    7272sub new {
    73     my ($class) = @_;
    74     my $self = new BasPlug ($class, @_);
    75     $self->{'plugin_type'} = "SRCPlug";
    76     # 14-05-02 To allow for proper inheritance of arguments - John Thompson
    77     my $option_list = $self->{'option_list'};
    78     push( @{$option_list}, $options );
    79 
    80     if (!parsargv::parse(\@_,
    81              q^remove_prefix/(\S+)/^, \$self->{'remove_prefix'},
    82              "allow_extra_options"
    83              )
    84     ) {
    85         print STDERR "\nIncorrect options passed to SRCPlug, ";
    86         print STDERR "check your collect.cfg configuration file\n";
    87     $self->print_txt_usage("");  # Use default resource bundle
    88         die "\n";
    89     }
     73    my ($class) = shift (@_);
     74    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
     75    push(@$pluginlist, $class);
     76
     77    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
     78    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
     79
     80    my $self = (defined $hashArgOptLists)? new BasPlug($pluginlist,$inputargs,$hashArgOptLists): new BasPlug($pluginlist,$inputargs);
     81
    9082    return bless $self, $class;
    9183}
Note: See TracChangeset for help on using the changeset viewer.