Ignore:
Timestamp:
2003-06-23T14:27:08+12:00 (21 years ago)
Author:
mdewsnip
Message:

Tidied up 'options' and 'arguments' structures (representing the options of the plugin) in preparation for removing the print_usage() routines.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/classify/List.pm

    r3728 r4759  
    5050
    5151my $arguments =
    52 [ {     'name' => "metadata",
     52    [ { 'name' => "metadata",
    5353    'desc' => "Metadata field used for classification. List will be sorted by this element.",
    5454    'type' => "metadata",
    5555    'reqd' => "yes" } ,
    56 {   'name' => "buttonname",
    57     'desc' => "Button name for this classification. Defaults to metadata name.",
     56      { 'name' => "buttonname",
     57    'desc' => "Button name for this classification.",
    5858    'type' => "string",
    59     'reqd' => "no" } ,
    60 {   'name' => "sort",
    61     'desc' => "Sort documents in list by this metadata field. By default it will sort by Metaname, or (if this is not set) in build (random) order.",
     59    'deft' => "Metadata element specified with -metadata",
     60    'reqd' => "no" },
     61      { 'name' => "sort",
     62    'desc' => "Metadata field to sort by. If not set, sorts in build (random) order.",
    6263    'type' => "string",
    63     'reqd' => "no" }
    64 ];
    65 
    66 my $options =
    67 {   'name'     => "List",
    68     'desc'     => "Simple list classifier plugin.",
    69     'inherits' => "Yes",
    70     'args'     => $arguments };
    71 
     64    'deft' => "Metadata field specified with -metadata",
     65    'reqd' => "no" } ];
     66
     67my $options = { 'name'     => "List",
     68        'desc'     => "Simple list classifier plugin.",
     69        'inherits' => "Yes",
     70        'args'     => $arguments };
    7271
    7372sub print_usage {
     
    9291    my $self = new BasClas($class, @_);
    9392
    94     # 14-05-02 To allow for proper inheritance of arguments - John Thompson
    95     my $option_list = $self->{'option_list'};
    96     push( @{$option_list}, $options );
    97    
     93    # 14-05-02 To allow for proper inheritance of arguments - John Thompson
     94    my $option_list = $self->{'option_list'};
     95    push( @{$option_list}, $options );
     96
    9897    my ($metaname, $title, $sortname, $list);
    9998
Note: See TracChangeset for help on using the changeset viewer.