Changeset 10218 for trunk/gsdl/perllib/classify/HTML.pm
- Timestamp:
- 2005-07-06T15:27:45+12:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/classify/HTML.pm
r6983 r10218 54 54 55 55 sub new { 56 my $class = shift (@_); 57 my $self = new BasClas($class, @_); 56 my ($class) = shift (@_); 57 my ($classifierslist,$inputargs,$hashArgOptLists) = @_; 58 push(@$classifierslist, $class); 58 59 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)}; 62 62 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); 67 64 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'}) { 81 66 my $outhandle = $self->{'outhandle'}; 82 67 print $outhandle "HTML Error: required option -url not supplied\n"; … … 84 69 die "HTML Error: required option -url not supplied\n"; 85 70 } 86 87 $self->{'url'} = $url;88 $self->{'title'} = $title;89 90 71 return bless $self, $class; 91 72 } … … 107 88 my %classifyinfo = ('thistype'=>'Invisible', 108 89 'childtype'=>'HTML', 109 'Title'=>$self->{' title'},90 'Title'=>$self->{'buttonname'}, 110 91 'contains'=>[]); 111 92
Note:
See TracChangeset
for help on using the changeset viewer.