Changeset 1483 for trunk/gsdl/perllib/classify/AZList.pm
- Timestamp:
- 2000-08-31T20:05:25+12:00 (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/classify/AZList.pm
r837 r1483 34 34 package AZList; 35 35 36 use BasClas; 36 37 use sorttools; 38 39 sub BEGIN { 40 @ISA = ('BasClas'); 41 } 37 42 38 43 sub new { 39 44 my ($class, @options) = @_; 45 my $self = new BasClas ($class, @_); 40 46 41 47 my ($metaname, $title); … … 49 55 } 50 56 51 die "AZList used with no metadata name to classify by\n" 52 unless defined $metaname; 57 if (!defined $metaname) { 58 my $outhandle = $self->{'outhandle'}; 59 print $outhandle "AZList used with no metadata name to classify by\n"; 60 die "\n"; 61 } 62 53 63 $title = $metaname unless defined $title; 54 64 55 return bless {56 'list'=>{}, 57 'metaname' => $metaname, 58 'title' => $title 59 }, $class;65 $self->{'list'} = {}; 66 $self->{'metaname'} = $metaname; 67 $self->{'title'} = $title; 68 69 return bless $self, $class; 60 70 } 61 71 … … 83 93 } 84 94 if (defined $self->{'list'}->{$doc_OID}) { 85 print STDERR "WARNING: AZList::classify called multiple times for $doc_OID\n"; 95 my $outhandle = $self->{'outhandle'}; 96 print $outhandle "WARNING: AZList::classify called multiple times for $doc_OID\n"; 86 97 } 87 98 $self->{'list'}->{$doc_OID} = $metavalue; … … 164 175 if ($title =~ /^[0-9]$/) {$title = '0-9';} 165 176 elsif ($title !~ /^[A-Z]$/) { 166 print STDERR "AZList: WARNING $classification has badly formatted title ($title)\n"; 177 my $outhandle = $self->{'outhandle'}; 178 print $outhandle "AZList: WARNING $classification has badly formatted title ($title)\n"; 167 179 } 168 180 $classhash->{$title} = [] unless defined $classhash->{$title};
Note:
See TracChangeset
for help on using the changeset viewer.