Changeset 9130
- Timestamp:
- 2005-02-22T13:40:56+13:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/classify/AutoHierarchy.pm
r8852 r9130 64 64 'desc' => "{AutoHierarchy.separator}", 65 65 'type' => "regexp", 66 'deft' => "[\\\\\\\/ ]",66 'deft' => "[\\\\\\\/|\\\\\\\|]", 67 67 'reqd' => "no" }, 68 68 { 'name' => "suppresslastlevel", … … 95 95 my $firstvalueonly = 0; 96 96 my $allvalues = 0; 97 my $suppresslastlevel = 0; 97 98 98 99 if (!parsargv::parse(\@_, … … 103 104 q^firstvalueonly^, \$firstvalueonly, 104 105 q^allvalues^, \$allvalues, 105 106 q^suppresslastlevel^, \$suppresslastlevel, 106 107 "allow_extra_options")) { 107 108 … … 121 122 122 123 if (!$separator) { 123 $separator = "[\\\/ ]";124 $separator = "[\\\/|\\\|]"; 124 125 } 125 126 $self->{'separator'} = $separator; … … 138 139 $self->{'allvalues'} = $allvalues; 139 140 140 $self->{'uniquelastbit'} = 1; 141 if ($suppresslastlevel != 0) { 142 $suppresslastlevel = 1; 143 } 144 $self->{'suppresslastlevel'} = $suppresslastlevel; 145 141 146 # sortname is handled a bit differently - kjdon 142 147 # undef means to sort, but use the metadata value from -metadata … … 216 221 $path_hash = $self->{'path_hash'}; 217 222 my @chunks = split (/$self->{'separator'}/, $metavalue); 218 if ($self->{' uniquelastbit'}) {223 if ($self->{'suppresslastlevel'}) { 219 224 pop(@chunks); # remove the last element from the end 220 225 }
Note:
See TracChangeset
for help on using the changeset viewer.