Changeset 10253 for trunk/gsdl/perllib/classify/HFileHierarchy.pm
- Timestamp:
- 2005-07-19T16:18:25+12:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/classify/HFileHierarchy.pm
r10223 r10253 33 33 use cfgread; 34 34 use sorttools; 35 36 use strict; 37 no strict 'refs'; # allow filehandles to be variables and viceversa 35 38 36 39 sub BEGIN { … … 92 95 93 96 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 } 94 102 95 103 my $metadata = $self->{'metadata'}; … … 177 185 # hash is a list of two items. The first item is the OID and the second item 178 186 # is the title 179 foreach $descriptor (keys (%$list)) {187 foreach my $descriptor (keys (%$list)) { 180 188 $self->{'descriptorlist'}->{$descriptor} = $list->{$descriptor}->[0]; 181 189 unless (defined $self->{'locatorlist'}->{$list->{$descriptor}->[0]}) { … … 218 226 219 227 # sorted the keys - otherwise funny things happen - kjdon 03/01/03 220 foreach $OID (sort keys (%$list)) {228 foreach my $OID (sort keys (%$list)) { 221 229 my $tempinfo = $self->get_OID_entry ($OID, $classifyinfo, $list->{$OID}->{'title'}, "VList"); 222 230 223 231 if (defined $self->{'sort'}) { 224 232 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'}}) { 226 234 push (@{$tempinfo->{'contains'}}, {'OID'=>$subOID->[0]}); 227 235 } 228 236 } 229 237 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'}}) { 231 239 push (@{$tempinfo->{'contains'}}, {'OID'=>$subOID->[0]}); 232 240 } … … 234 242 } 235 243 else { 236 foreach $subOID (@{$list->{$OID}->{'contents'}}) {244 foreach my $subOID (@{$list->{$OID}->{'contents'}}) { 237 245 push (@{$tempinfo->{'contains'}}, {'OID'=>$subOID->[0]}); 238 246 }
Note:
See TracChangeset
for help on using the changeset viewer.