# Fixed no argument Tgetent()
# Version 1.03: Wed Nov 28 10:09:38 GMT 2001
# VMS Support from Charles Lane <lane@DUPHY4.Physics.Drexel.Edu>
+# Version 1.04: Thu Nov 29 16:22:03 GMT 2001
+# Fixed warnings in test
# TODO:
# support Berkeley DB termcaps
# Precompile $entry into the object
$entry =~ s/^[^:]*://;
foreach $field (split(/:[\s:\\]*/,$entry)) {
- if ($field =~ /^(\w\w)$/) {
+ if (defined $field && $field =~ /^(\w\w)$/) {
$self->{'_' . $field} = 1 unless defined $self->{'_' . $1};
# print STDERR "DEBUG: flag $1\n";
}
- elsif ($field =~ /^(\w\w)\@/) {
+ elsif (defined $field && $field =~ /^(\w\w)\@/) {
$self->{'_' . $1} = "";
# print STDERR "DEBUG: unset $1\n";
}
- elsif ($field =~ /^(\w\w)#(.*)/) {
+ elsif (defined $field && $field =~ /^(\w\w)#(.*)/) {
$self->{'_' . $1} = $2 unless defined $self->{'_' . $1};
# print STDERR "DEBUG: numeric $1 = $2\n";
}
- elsif ($field =~ /^(\w\w)=(.*)/) {
+ elsif (defined $field && $field =~ /^(\w\w)=(.*)/) {
# print STDERR "DEBUG: string $1 = $2\n";
next if defined $self->{'_' . ($cap = $1)};
$_ = $2;
my($string, $cnt, $FH) = @_;
my($decr, $ms);
- if ($string =~ /(^[\d.]+)(\*?)(.*)$/) {
+ if (defined $string && $string =~ /(^[\d.]+)(\*?)(.*)$/) {
$ms = $1;
$ms *= $cnt if $2;
$string = $3;