Changeset 10255


Ignore:
Timestamp:
2005-07-19T16:56:45+12:00 (19 years ago)
Author:
kjdon
Message:

small mods, added use strict

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/bin/script/import.pl

    r10215 r10255  
    4545use docprint;
    4646use util;
    47 use parsargv;
    4847use FileHandle;
    4948use gsprintf 'gsprintf';
    5049use printusage;
    5150use parse2;
     51
     52use strict;
     53no strict 'refs'; # allow filehandles to be variables and vice versa
     54no strict 'subs'; # allow barewords (eg STDERR) as function arguments
    5255
    5356my $oidtype_list =
     
    221224    $pluginfo, $sortmeta, $removeprefix, $removesuffix,
    222225    $archive_info_filename, $statsfile,
    223     $archive_info, $processor, $out, $faillog, $collectdir, $gli);
     226    $archive_info, $processor, $out, $faillog, $collectdir, $gli, $language);
    224227
    225228    my $xml = 0;
     
    230233    my $blnParseFailed = "false";
    231234    # general options available to all plugins
    232     $intArgLeftinAfterParsing = parse2::parse(\@ARGV,$arguments,$hashParsingResult,"allow_extra_options");
     235    my $intArgLeftinAfterParsing = parse2::parse(\@ARGV,$arguments,$hashParsingResult,"allow_extra_options");
    233236    # If there are more than one argument left after parsing, it mean user input too many arguments.
    234237    # Error occoured  will return 0
    235238    if($intArgLeftinAfterParsing != 1)
    236239    {
    237     $blnParseFailed = "true";
    238     }
    239     if($blnParseFailed eq "true")
    240     {
    241240    &PrintUsage::print_txt_usage($options, "{import.params}");
    242241    die "\n";
    243242    }
     243   
    244244    foreach my $strVariable (keys %$hashParsingResult)
    245245    {
     
    249249    # If $language has been specified, load the appropriate resource bundle
    250250    # (Otherwise, the default resource bundle will be loaded automatically)
    251     if ($language) {
     251    if ($language && $language =~ /\S/) {
    252252    &gsprintf::load_language_specific_resource_bundle($language);
    253253    }
Note: See TracChangeset for help on using the changeset viewer.