Changeset 2086


Ignore:
Timestamp:
2001-02-28T18:01:05+13:00 (23 years ago)
Author:
jrm21
Message:

We create a copy of any args to new() because parsargs might modify the
list, deleting items needed later by call to TEXTPlug::new or HTMLPlug::new

File:
1 edited

Legend:

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

    r2041 r2086  
    9292sub new {
    9393    my $class = shift (@_);
     94    if ($class eq "ConvertToPlug") {$class = shift (@_);}
     95    my $self;
     96# parsargv::parse might modify the list, so we do this by creating a copy
     97# of the argument list.
     98    my @arglist = @_;
    9499    my ($plugin_name,$generate_format, $kea_arg) = $class->parse_args(\@_);
    95     my $self;
    96100
    97101    if ($generate_format eq "text")
    98102    {
    99     $self = new TEXTPlug ($class, @_);
     103    $self = new TEXTPlug ($class, @arglist);
    100104    $self->{'convert_to'} = "TEXT";
    101105    $self->{'convert_to_ext'} = "txt";
     
    103107    else
    104108    {
    105     $self = new HTMLPlug ($class, @_);
     109    $self = new HTMLPlug ($class, @arglist);
    106110    $self->{'convert_to'} = "HTML";
    107111    $self->{'convert_to_ext'} = "html";
Note: See TracChangeset for help on using the changeset viewer.