Changeset 10350


Ignore:
Timestamp:
2005-07-28T17:08:45+12:00 (19 years ago)
Author:
kjdon
Message:

added a check for defined before removing the .pm

Location:
trunk/gsdl/bin/script
Files:
2 edited

Legend:

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

    r10230 r10350  
    103103    # Get classifier
    104104    my $classifier = shift (@ARGV);
    105     $classifier =~ s/\.pm$//; # allow xxx.pm as the argument
    106    
     105    if (defined $classifier) {
     106    $classifier =~ s/\.pm$//; # allow xxx.pm as the argument
     107    }
    107108    if (($listall == 0) && (!defined $classifier || $classifier eq "")) {
    108109    &gsprintf(STDERR, "{classinfo.no_classifier_name}\n\n");
  • trunk/gsdl/bin/script/pluginfo.pl

    r10230 r10350  
    121121
    122122    my $plugin = shift (@ARGV);
    123     $plugin =~ s/\.pm$//; # allow xxxPlug.pm as the argument
    124    
     123    if (defined $plugin) {
     124    $plugin =~ s/\.pm$//; # allow xxxPlug.pm as the argument
     125    }
    125126    if (($listall == 0) && (!defined $plugin || $plugin eq "")) {
    126127    gsprintf(STDERR, "{pluginfo.no_plugin_name}\n\n");
Note: See TracChangeset for help on using the changeset viewer.