John Baleshiski > Net-WWD-1.00 > Net::WWD::Client

Download:
Net-WWD-1.00.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.54   Source  

NAME ^

Net::WWD::Client - WorldWide Database Client

SYNOPSIS ^

use Net::WWD::Client;

$wwd = new Net::WWD::Client;

$wwd->auth($username,$password);

print $wwd->get($domainname, $link, $readpassword);

$wwd->set($domainname, $link, $value, $modifypassword, $newmodifypassword, $temporarypassword, $timetoliveinseconds, $readpassword, $allowediplist);

$wwd->delete($domainname, $link, $readpassword);

WWD OBJECT SPACE ^

To obtain a username and password to be able to use WWD objects on the server IDServer.org, please visit http://idserver.org/signup

EXPORT ^

None by default.

METHODS ^

SET AUTHORIZATION

  $wwd->auth($username,$password);
  
  Sets internal variables to passing the username and password for every call is not needed. Set this if you need to access non-public objects.

GET WWD OBJECT

  $wwd->get($site,$link,$readpassword,$flags);
  
  This function will first look in the current users wwd object cache. When a request is made to the WWD Interface, three items are returned in a : seperated list. The first item is the timestamp when the object was last modified. The second item is the object's TIME TO LIVE in seconds. A value of 0 or a negative value means the object will never be stored to the local wwd object cache.
  
  If the item is found in the local cache and has not yet expired, it's value will be used. Otherwise, the object will be requested from the server and then stored into the local wwd object cache unless it's TTL is 0 or negative.

  Currently, the only flag to pass is "n" meaning don't use any cached result (always pull from the server.

SET THE VALUE OF A WWD OBJECT

  $wwd->set($site,$link,$value,$currentModifyPassword,$newModifyPassword,$temppass,$ttl,$readpass,$allowedlist);
  
  If the object currently has a modification password set (this is highly recommended) it must be passed in $currentModifyPassword.
  
  To specify a new modification password, set $newModifyPassword
  
  To set a temporary read password, set $temppass to $ttl:$data. For example, to set the temporary password to "hello" for the next 100 seconds, set $temppass to "100:hello";
  
  To set the object's cache TIME TO LIVE (in seconds), set $ttl. TTL can be set to 0 or a negative number to turn off all wwd client's caching of this object.
  
  To set the read password, set $readpass
  
  To restrict access to the object, set $allowedlist. To add a domainname or IP address to the allowed list, set $allowedlist to "+(domain/ip". For example, "+axissite.com". To remove a domainname or IP address from the allowed list, set $allowedlist to "-(domain/ip". To set the allowed list to a certain list, to not include the + or - as the first character. For example, to allow 192.168.1.10 and 192.168.1.11 only, set $allowedlist to "192.168.1.10,192.168.1.11". To set the domain or ip to only be able to read the value of the object 10 times, append ";10R" to the ip or domainname. For example, "+axissite.com;10R". For every read, the count will decrement. When it has been exhausted, it will automatically be removed from the list. This list is in addition to any possible read password. You can restrict access to certain ip addresses and have a read password. Both must evalute true for the object to be returned.

DELETE WWD OBJECT

  $wwd->delete($site,$link,$pw);

  Example: $wwd->delete("idserver.org","testobject",$password);
  
  Example will delete the "testobject" from "idserver.org"
  If the read password exists, it must be supplied via $password)

AUTHOR ^

John Baleshiski, <john@idserver.org>

For more information and the technical specification, visit http://idserver.org/wwd

COPYRIGHT AND LICENSE ^

Copyright (C) 2005 by John Baleshiski

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.0 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: