Net::Whois::RIPE::Syncupdates::Message - Subclass to encapsulate Syncupdates messages
use Net::Whois::RIPE::Syncupdates::Message; Net::Whois::RIPE::Syncupdates::Message::Auth ->defaultPassword('myPassword'); my $msg = Net::Whois::Syncupdates::Message->new; $msg->setOption(ORIGIN, 'client_ID'); $msg->setOption(NEW, 1); $msg->setDBObject(<<END_OBJ); inetnum: 192.168.0.0 - 192.168.255.255 netname: IANA-CBLK-RESERVED1 descr: Class C address space for private internets descr: See http://www.ripe.net/db/rfc1918.html for details country: NL admin-c: RFC1918-RIPE tech-c: RFC1918-RIPE status: ALLOCATED UNSPECIFIED mnt-by: RIPE-NCC-HM-MNT changed: rfc1918@ripe.net 20020129 source: RIPE END_OBJ $msg->setDBObject( $msg->getDBObject . "\nchanged: test@provider.com 20030324" );
Net::Whois::RIPE::Syncupdates::Message is a subclass, primarily being used by Net::Whois::RIPE::Syncupdates, the RIPE NCC Syncupdates Perl interface.
Net::Whois::RIPE::Syncupdates::Message
Net::Whois::RIPE::Syncupdates
See the Net::Whois::RIPE::Syncupdates manpage for more information.
Variable names accepted by the syncupdates server:
ORIGIN NEW HELP DATA
Constructor.
Returns associated Authorization object of type Net::Whois::RIPE::Syncupdates::Message::Auth
Return the message as a hashref, ready to be passed over to the syncupdates backend. Although this method is public, its primary use is to be called by Net::Whois::RIPE::Syncupdates::execute().
Net::Whois::RIPE::Syncupdates::execute()
Return the database object stored within this instance, previously set via setDBObject(). Empty string if the DB object has not yet been set.
Set the database object to be sent within this message. Objects are accepted either as string or as a Net::Whois::RIPE::RPSL object.
Net::Whois::RIPE::RPSL
The Message object simply acts as a container, the supplied database object is being stored internally as a string. If passed a non-scalar value, setDBObject() will try to call an as_string() method upon that object, and store the returned string internally.
Message
It only works on text objects. No error conditions defined.
TODO: Use RPSL if you can
Constructor
Change default Authorization hook. Default is 'simple_sign'.
Calls the defined authorization hook, supplying the Whois object as parameter.
Returns or sets the authorization hook. Expects and returns a CODE reference.
The default authorization hook, which adds a password: line to the object. Custom hooks should do same sort of operations on Whois object.
sub simple_sign { my $object = shift; return $object unless defaultPassword(); return $object . 'password: '. defaultPassword() ."\n"; }
Peter Banik <peter@ripe.net>, Ziya Suzen <peter@ripe.net>
$Id: Message.pm,v 1.16 2003/08/01 13:46:16 peter Exp $
Please report bugs to <swbugs@ripe.net>.
Copyright (c) 1993 - 2003 RIPE NCC
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission.
THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
3 POD Errors
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head1'
'=item' outside of any '=over'
=back doesn't take any parameters, but you said =back 4
To install Net::Whois::RIPE::Syncupdates, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Whois::RIPE::Syncupdates
CPAN shell
perl -MCPAN -e shell install Net::Whois::RIPE::Syncupdates
For more information on module installation, please visit the detailed CPAN module installation guide.