
Net::Whois::RegistryFusion - perform cacheable whois lookups using RegistryFusion XML API

my $rf = new Net::Whois::RegistryFusion;
$rf->isCached('domain.com')
&&
my $xml = $rf->whois('domain.com');

This class does not do any XML parsing. You must create a subclass inheriting and extending the whois method where you can code the XML parsing using eg. XML::Simple. You must also implement the _getUsername, _getPassword, _getXmlpath methods.
The class does some basic on-disk caching of the raw xml retrieved from RegistryFusion. The path to the cache is specified using _getXmlpath method.

Must be implemented to return a RegistryFusion username
Must be implemented to return a RegistryFusion password
Must be implemented to return a path where XML cache files will be stored

This is the constructor. It takes as argument an optional hash with a 'resetCache' key. Setting 'resetCache' to a value of 1 will alter the behaviour of the whois method for the lifetime of the object; foregoing and deleting the cached domain (if any) and retrieving directly from RegistryFusion.
Returns whois info in xml format for given $domain. Checks the cache first. If not found in the cache, retrieves from RegistryFusion. The whois xml info is cached in a file under the path as returned by _getXmlpath method. So, if the XMLPATH is '/registryfusion' and the $domain is 'example.com', the file will be stored as '/registryfusion/e/example.com.xml'
Accessor returns arrayref of domains that had the whois info fetched from RegistryFusion (and not the cache)
Returns TRUE if given domain is cached. FALSE otherwise.
Deletes the given $domain from the cache.
Logs out of RegistryFusion, expiring the session. This method is called by the destructor, so you don't need to explicitly call it.
returns session key.

Login to RegistryFusion and return a session key. this method is called by the constructor.

Need generic test suite. eg. use Class::Generate to generate a subclass. Get the username, password, xmlpath values from user during make test.
I've started doing this but encountered a problem with the fact that the username, password and xmlpath variables are static class variables and Class::Generate doesn't take care of this. Maybe we can improve Class::Generate.
My current progress can be seen embedded in the pod (Test::Inline style).

Ilia Lobsanov

Copyright (C) 2004 by Ilia Lobsanov
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any later version of Perl 5 you may have available.