Changeset 4762
- Timestamp:
- 2003-06-23T14:31:57+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/bin/script/classinfo.pl
r3541 r4762 48 48 print STDERR " first. If it doesn't find it there it will look in the general\n"; 49 49 print STDERR " perllib/classify directory.\n\n"; 50 51 50 print STDERR " -xml Produces the information in an xml form, without\n"; 51 print STDERR " 'pretty' comments but with much more detail.\n"; 52 52 } 53 53 … … 56 56 sub main { 57 57 my $collect = ""; 58 58 my $xml = 0; 59 59 60 60 # Parse command line 61 61 if (!parsargv::parse(\@ARGV, q^collect/.*/^, \$collect, q^xml^, \$xml )) 62 63 64 62 { 63 &print_usage(); 64 die "\n"; 65 65 } 66 66 … … 68 68 my $classifier = shift (@ARGV); 69 69 if (!defined $classifier || $classifier eq "") { 70 71 72 70 print STDERR "You must provide a classifier name\n"; 71 &print_usage(); 72 die "\n"; 73 73 } 74 74 75 75 # make sure the classifier is loaded from the correct location - a hack. 76 76 if ($collect ne "") { 77 77 $ENV{'GSDLCOLLECTDIR'} = &util::filename_cat ($ENV{'GSDLHOME'}, "collect", $collect); 78 78 } else { 79 79 $ENV{'GSDLCOLLECTDIR'} = $ENV{'GSDLHOME'}; 80 80 } 81 81 82 82 my $classinfo = &classify::load_classifiers ([[$classifier]]); 83 83 my $classobj = shift @$classinfo; … … 86 86 { 87 87 $classobj->print_xml_usage(); 88 89 90 91 88 } 89 else 90 { 91 print STDERR " 92 92 $classifier info: 93 93 … … 97 97 Classifiers may take two types of options: 98 98 99 General options are defined within the base class (BasClas.pm) and are 100 inherited by any classifier that has been correctly derived from BasClas. 99 "; 100 print STDERR "Specific options are defined within the classifier itself, and are available\n"; 101 print STDERR "only to this particular classifier.\n\n"; 101 102 102 Specific options are defined within the classifier itself and are available 103 only to this particular classifier. 103 print STDERR "General options are inherited from parent classes of the classifer.\n\n"; 104 104 105 $classifier takes the following specific options: 106 "; 107 $classobj->print_usage(); 105 # General options are defined within the base class (BasClas.pm) and are 106 # inherited by any classifier that has been correctly derived from BasClas. 108 107 109 print STDERR "$classifier takes the following general options 110 "; 111 &BasClas::print_general_usage($classifier); 112 } 108 # Specific options are defined within the classifier itself and are available 109 # only to this particular classifier. 110 111 # $classifier takes the following specific options: 112 # "; 113 # $classobj->print_usage(); 114 $classobj->new_print_usage(); 115 116 # print STDERR "$classifier takes the following general options 117 # "; 118 # &BasClas::print_general_usage($classifier); 119 } 113 120 } 114 121
Note:
See TracChangeset
for help on using the changeset viewer.