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/classify/HTML.pm

    r6983 r10218  
    5454
    5555sub new {
    56     my $class = shift (@_);
    57     my $self = new BasClas($class, @_);
     56    my ($class) = shift (@_);
     57    my ($classifierslist,$inputargs,$hashArgOptLists) = @_;
     58    push(@$classifierslist, $class);
    5859
    59     # 14-05-02 To allow for proper inheritance of arguments - John Thompson
    60     my $option_list = $self->{'option_list'};
    61     push( @{$option_list}, $options );
     60    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
     61    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
    6262
    63     if ($self->{'info_only'}) {
    64     # created from classinfo.pl - don't need to parse the arguments
    65     return bless $self, $class;
    66     }
     63    my $self = (defined $hashArgOptLists)? new BasClas($classifierslist,$inputargs,$hashArgOptLists): new BasClas($classifierslist,$inputargs);
    6764
    68     my ($title, $url);
    69    
    70     if (!parsargv::parse(\@_,
    71              q^url/.*/^, \$url,
    72              q^buttonname/.*/Browse^, \$title,
    73              "allow_extra_options")) {
    74    
    75     print STDERR "\nIncorrect options passed to $class, check your collect.cfg file\n";
    76     $self->print_txt_usage("");  # Use default resource bundle
    77     die "\n";
    78     }
    79 
    80     if (!$url) {
     65    if (!$self->{'url'}) {
    8166    my $outhandle = $self->{'outhandle'};
    8267    print $outhandle "HTML Error: required option -url not supplied\n";
     
    8469    die "HTML Error: required option -url not supplied\n";
    8570    }
    86 
    87     $self->{'url'} = $url;
    88     $self->{'title'} = $title;
    89 
    9071    return bless $self, $class;
    9172}
     
    10788    my %classifyinfo = ('thistype'=>'Invisible',
    10889            'childtype'=>'HTML',
    109             'Title'=>$self->{'title'},
     90            'Title'=>$self->{'buttonname'},
    11091            'contains'=>[]);
    11192
Note: See TracChangeset for help on using the changeset viewer.