+18Jan22=======================================================================
+1. fix (un)set/registered.
09Jan22=======================================================================
1. Add the New Year CTY-3201 prefix data.
08Jan22=======================================================================
my $build = $part[2] || 0;
my $ip = $part[3] || '';
- if ($version =~ /[,.]/) {
+ if (is_ipaddr($version)) {
$ip = $version;
$version = 0;
}
- $version =~ s/\D+//g;
+ $version =~ s/\D//g;
$build =~ s/^0\.//;
- $build =~ s/\D+//g;
+ $build =~ s/\D//g;
+ $version ||= 0;
+ $build ||= 0;
+
if ($ip) {
$ip =~ s/,/:/g;
$ip =~ s/^::ffff://i;
sub registered
{
my $self = shift;
+ my $val;
+ if (defined $_[0]) {
+ $val = unpad($_[0]);
+ $self->{registered} = $val;
+ }
if (exists $self->{registered}) {
- return $self->{registered} || 0;
+ $val = $self->{registered} // 0;
}
- return ''; # to stop undef warnings
+ return $val // 0 ; # to stop undef warnings
}
1;