Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: whois module query

by tadman (Prior)
on May 01, 2002 at 09:19 UTC ( [id://163228]=note: print w/replies, xml ) Need Help??


in reply to whois module query

It would seem that 'n/a' just shows up whenever it can't grok what is going on. It could be a defect in the Netsol.pm parsing module, which can occur when data is misaligned. Here's the juicy bit from that module:
sub regex_created { '^Record created on (.*).$' } sub regex_expires { '^Record expires on (.*).$' }
Personally, I'd put \s* wherever there could be space-like characters, since you never really know what they're going to think of doing next. Stuff tends to float. You've practically got to assume that where there is one space, there might be dozens. This might be better written as:
sub regex_created { '^\s*Record created on\s+(.*).' } sub regex_expires { '^\s*Record expires on\s+(.*).' }
There's no trimming going on either, apparently:
my $text = $self->_send_to_sock( $sock ); # ... $self->parse_text($text);
No evidence of s/^\s+//, which I would've figured had to be in there somewhere since Netsol records are typically indented with spaces.

I had a program that used to parse these things into little pieces, tearing apart even the address into city, state, zip, with a high degree of accuracy. I wonder if it's still workable.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://163228]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-24 12:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found