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

added 'use strict' to all classifiers, and made modifications (mostly adding 'my') to make them compile

File:
1 edited

Legend:

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

    r10223 r10253  
    3333use cfgread;
    3434use sorttools;
     35
     36use strict;
     37no strict 'refs'; # allow filehandles to be variables and viceversa
    3538
    3639sub BEGIN {
     
    9295
    9396    my $self = (defined $hashArgOptLists)? new BasClas($classifierslist,$inputargs,$hashArgOptLists): new BasClas($classifierslist,$inputargs);
     97
     98    if ($self->{'info_only'}) {
     99    # don't worry about any options etc
     100    return bless $self, $class;
     101    }
    94102
    95103    my $metadata = $self->{'metadata'};
     
    177185    # hash is a list of two items. The first item is the OID and the second item
    178186    # is the title
    179     foreach $descriptor (keys (%$list)) {
     187    foreach my $descriptor (keys (%$list)) {
    180188        $self->{'descriptorlist'}->{$descriptor} = $list->{$descriptor}->[0];
    181189        unless (defined $self->{'locatorlist'}->{$list->{$descriptor}->[0]}) {
     
    218226
    219227    # sorted the keys - otherwise funny things happen - kjdon 03/01/03
    220     foreach $OID (sort keys (%$list)) {
     228    foreach my $OID (sort keys (%$list)) {
    221229    my $tempinfo = $self->get_OID_entry ($OID, $classifyinfo, $list->{$OID}->{'title'}, "VList");
    222230   
    223231    if (defined $self->{'sort'}) {
    224232        if ($self->{'reverse_sort'}) {
    225         foreach $subOID (sort {$b->[1] cmp $a->[1];} @{$list->{$OID}->{'contents'}}) {
     233        foreach my $subOID (sort {$b->[1] cmp $a->[1];} @{$list->{$OID}->{'contents'}}) {
    226234            push (@{$tempinfo->{'contains'}}, {'OID'=>$subOID->[0]});
    227235        }
    228236        }
    229237        else {
    230         foreach $subOID (sort {$a->[1] cmp $b->[1];} @{$list->{$OID}->{'contents'}}) {
     238        foreach my $subOID (sort {$a->[1] cmp $b->[1];} @{$list->{$OID}->{'contents'}}) {
    231239            push (@{$tempinfo->{'contains'}}, {'OID'=>$subOID->[0]});
    232240        }
     
    234242    }
    235243    else {
    236         foreach $subOID (@{$list->{$OID}->{'contents'}}) {
     244        foreach my $subOID (@{$list->{$OID}->{'contents'}}) {
    237245        push (@{$tempinfo->{'contains'}}, {'OID'=>$subOID->[0]});
    238246        }
Note: See TracChangeset for help on using the changeset viewer.