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

    r8121 r10218  
    2828package LaTeXPlug;
    2929
    30 use strict;
    31 no strict 'refs'; # so we can print to a handle named by a variable
     30# System complains about $arguments if the strict is set
     31#use strict;
     32#no strict 'refs'; # so we can print to a handle named by a variable
    3233
    3334# greenstone packages
     
    3738use util;
    3839
     40my $options={ 'name' => 'LaTeXPlug',
     41          'desc' => '{LaTeXPlug.desc}',
     42          'abstract' => 'no',
     43          'inherits' => 'yes' };
    3944sub BEGIN {
    4045    @LaTeXPlug::ISA = ('BasPlug');
     
    4651
    4752sub new {
    48     my $class = shift (@_);
    49     my $self = new BasPlug ($class, @_);
    50     $self->{'plugin_type'} = 'LaTeXPlug';
    51     my $option_list = $self->{'option_list'};
    52     my $options={ 'name' => 'LaTeXPlug',
    53           'desc' => '{LaTeXPlug.desc}',
    54           'abstract' => 'no',
    55           'inherits' => 'yes',
    56           'args' => [
    57                  ] # no arguments for now...
    58                  };
    59 
    60     push( @{$option_list}, $options );
    61 
    62     if (!parsargv::parse(\@_,
    63              "allow_extra_options")) {
    64 
    65     print STDERR "\nIncorrect options passed to LaTeXPlug, check your collect.cfg configuration file\n";
    66     $self->print_txt_usage(""); # don't specify which language bundle
    67     die "\n";
    68     }
     53    my ($class) = shift (@_);
     54    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
     55    push(@$pluginlist, $class);
     56
     57    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
     58    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
     59
     60    my $self = (defined $hashArgOptLists)? new BasPlug($pluginlist,$inputargs,$hashArgOptLists): new BasPlug($pluginlist,$inputargs);
    6961
    7062    $self->{'aux_files'} = {};
Note: See TracChangeset for help on using the changeset viewer.