Ignore:
Timestamp:
2003-06-20T14:22:34+12:00 (21 years ago)
Author:
mdewsnip
Message:

Tidied up and 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/plugins/DBPlug.pm

    r4429 r4744  
    4444}
    4545
    46 my $arguments = [ { 'name' => "process_exp",
    47                           'desc' => "A perl regular expression to match against filenames. Matching filenames will be processed by this plugin. Each plugin has its own default process_exp. e.g HTMLPlug defaults to '(?i)\.html?\$' i.e. all documents ending in .htm or .html (case-insensitive).",
    48                           'type' => "string",
    49                           'deft' => q^(?i)\.dbi$^,
    50                           'reqd' => "no" } ,
    51                         { 'name' => "title_sub",
    52                           'desc' => "Substitution expression to modify string stored as Title. Used by, for example, PSPlug to remove \"Page 1\" etc from text used as the title.",
    53                           'type' => "string",
    54                           'reqd' => "no" }];
     46my $arguments =
     47    [ { 'name' => "process_exp",
     48    'desc' => "A perl regular expression to match against filenames. Matching filenames will be processed by this plugin. For example, using '(?i).html?\$' matches all documents ending in .htm or .html (case-insensitive).",
     49    'type' => "string",
     50    'deft' => &get_default_process_exp(),
     51    'reqd' => "no" } ,
     52      { 'name' => "title_sub",
     53    'desc' => "Substitution expression to modify string stored as Title. Used by, for example, PSPlug to remove \"Page 1\" etc from text used as the title.",
     54    'type' => "string",
     55    'deft' => "",
     56    'reqd' => "no" }];
    5557
    5658my $options = { 'name'     => "DBPlug",
    57                  'desc'     => "Uses records from a database as documents.",
    58                      'inherits' => "yes",
    59                      'args'     => $arguments };
     59        'desc'     => "Uses records from a database as documents.",
     60        'inherits' => "yes",
     61        'args'     => $arguments };
    6062
    6163sub print_usage {
Note: See TracChangeset for help on using the changeset viewer.