Changeset 1839 for trunk/gsdl/perllib/classify.pm
- Timestamp:
- 2001-01-16T11:50:05+13:00 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/classify.pm
r1515 r1839 34 34 35 35 sub load_classifiers { 36 my ($classify_list ) = @_;36 my ($classify_list, $build_dir, $outhandle) = @_; 37 37 my @classify_objects = (); 38 38 39 my $outhandle = pop (@_);40 41 39 foreach $classifyoption (@$classify_list) { 42 40 … … 44 42 my $classname = shift @$classifyoption; 45 43 next unless defined $classname; 46 44 47 45 # find the classifier 48 46 my $colclassname = &util::filename_cat($ENV{'GSDLCOLLECTDIR'},"perllib/classify", … … 57 55 # create the classify object 58 56 my ($classobj); 59 map { $_ = "\"$_\""; } @$classifyoption; 60 my $options = join (",", @$classifyoption, $outhandle); 57 58 # backwards compatability hack: if the classifier options are 59 # in "x=y" format, convert them to parsearg ("-x y") format. 60 my ($opt, $key, $value); 61 my @newoptions; 62 foreach $opt (@$classifyoption) { 63 if ($opt =~ /^(\w+)=(.*)$/) { 64 push @newoptions, "-$1", $2; 65 } else { 66 push @newoptions, $opt; 67 } 68 } 69 push @newoptions, "-builddir", "$build_dir"; 70 push @newoptions, "-outhandle", "$outhandle"; 71 push @newoptions, "-verbosity", "2"; 72 73 map { $_ = "\"$_\""; } @newoptions; 74 my $options .= join (",", @newoptions); 75 76 # print STDERR "$classname\noptions: $options\n"; 61 77 eval ("\$classobj = new \$classname($options)"); 62 78 die "$@" if $@; 63 64 # add this object to the list79 80 # add this object to the list 65 81 push (@classify_objects, $classobj); 66 82 }
Note:
See TracChangeset
for help on using the changeset viewer.