Changeset 17057

Show
Ignore:
Timestamp:
28.08.2008 13:29:45 (11 years ago)
Author:
kjdon
Message:

added some more warnings when tidying up assigned OIDs

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/doc.pm

    r17025 r17057  
    283283     
    284284    my $use_hash_oid = 0; 
    285     # if an OID wasn't provided claculate one 
     285    # if an OID wasn't provided calculate one 
    286286    if (!defined $OID) { 
    287287    $OID = "NULL"; 
     
    313313        if (defined $identifier && $identifier ne "") { 
    314314        $OID = $identifier; 
    315         $OID =~ s/\.//; #remove any periods 
     315        if ($OID =~ /\./) { 
     316            print STDERR "Warning, assigned identifier $identifier contains periods (.), removing them\n"; 
     317            $OID =~ s/\.//g; #remove any periods 
     318        } 
     319        if ($OID =~ /^\d*$/) { 
     320            print STDERR "Warning, assigned identifier $identifier contains only digits. Prepending 'D'.\n"; 
     321            $OID = "D" . $OID; 
     322        } 
    316323        if ($OID =~ /^[\d]*$/) { 
    317324            $OID = "D" . $OID;