The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Net::Whois::RIPE::Syncupdates::Message - Subclass to encapsulate Syncupdates messages

SYNOPSIS

  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" );
  

DESCRIPTION

Net::Whois::RIPE::Syncupdates::Message is a subclass, primarily being used by Net::Whois::RIPE::Syncupdates, the RIPE NCC Syncupdates Perl interface.

See the Net::Whois::RIPE::Syncupdates manpage for more information.

CONSTANTS

Variable names accepted by the syncupdates server:

    ORIGIN
    NEW
    HELP
    DATA

METHODS

Net::Whois::RIPE::Syncupdates::Message

new ( )

Constructor.

auth ( )

Returns associated Authorization object of type Net::Whois::RIPE::Syncupdates::Message::Auth

getMessage( )

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().

getDBObject( )

Return the database object stored within this instance, previously set via setDBObject(). Empty string if the DB object has not yet been set.

setDBObject ( OBJECT | RPSL_OBJECT )

Set the database object to be sent within this message. Objects are accepted either as string or as a Net::Whois::RIPE::RPSL object.

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.

getOption ( OPTION )
setOption ( OPTION [, VALUE ] )
changedBy ( Email )
appendChangedBy ( OBJ )

It only works on text objects. No error conditions defined.

TODO: Use RPSL if you can

Net::Whois::RIPE::Syncupdates::Message::Auth

new ( )

Constructor

defaultAuthHook

Change default Authorization hook. Default is 'simple_sign'.

sign ( )

Calls the defined authorization hook, supplying the Whois object as parameter.

authHook ( [CODEREF] )

Returns or sets the authorization hook. Expects and returns a CODE reference.

simple_sign ( OBJECT )

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";
  }

AUTHOR

Peter Banik <peter@ripe.net>, Ziya Suzen <peter@ripe.net>

SEE ALSO

Net::Whois::RIPE::Syncupdates

VERSION

$Id: Message.pm,v 1.16 2003/08/01 13:46:16 peter Exp $

BUGS

Please report bugs to <swbugs@ripe.net>.

COPYRIGHT

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:

Around line 81:

You forgot a '=back' before '=head1'

Around line 336:

'=item' outside of any '=over'

Around line 437:

=back doesn't take any parameters, but you said =back 4