HyperWave::CSP - Communicate with a HyperWave server
use HyperWave::CSP; $server = HyperWave::CSP->New("my.hyperwave.server"); $server->quit;
HyperWave is a class implementing a simple HyperWave client in Perl.
HyperWave
This is the constructor for a new HyperWave object. HOST is the name of the remote host to which a HyperWave connection is required. If not given the environment variables HWHOST and then HGHOST are checked, and if a host is not found then localhost is used.
HOST
HWHOST
HGHOST
localhost
PORT is the HyperWave port to connect to, it defaults to the environment variable HWPORT, then HGPORT and then to the standard port 418 if nothing else is found.
PORT
HWPORT
HGPORT
USERNAME and PASSWORD are the HyperWave username and password, they default to anonymous. ENCRYPT will eventually allow you to pass the password in in encrypted form rather than plaintext, but is not yet implemented.
USERNAME
PASSWORD
ENCRYPT
LANGUGAE also is not yet used, and defaults to the value of the environment variable HWLANGUAGE and then to English.
LANGUGAE
HWLANGUAGE
The constructor returns the open socket, or undef if an error has been encountered.
undef
Unless otherwise stated all methods return either a true or false value, with true meaning that the operation was a success. When a method states that it returns a value, failure will be returned as undef or an empty list.
Returns string containing various statistics for the server.
Returns string containing current users for the server.
Returns object number for the document with NAME as an attribute, or false on error.
Returns a guess at a URL that might work for the document OBJNUM to be retreived via the HyperWave HTTP interface. Note that it is ONLY a guess. For one thing, it depends on the HyperWave server running a web interface on the default HTTP port.
Returns a string containing the attributes for OBJNUM. The string is in form key1=value1\nkey2=value2\n....
key1=value1\nkey2=value2\n...
Like get_attributes() except that the attributes are returned as a hash.
Returns body text for the objnum passed. This usually means HTML sans anchors in practical terms.
Returns HTML text, including anchors, for the objnum passed.
Returns output of the CGI, for the objnum passed. Depends on the CGI script not requiring input.
Adds an attribute to the given objnum. Note that HyperWave allows multiple attributes of the same name, so if you add an attribute that already exists you'll end up with two. Use change_attribute if you want to overwrite the old one.
Removes an attribute to the given objnum. Note that you DO need to know the old value because HyperWave allows multiple attributes with the same value.
Alters an attribute to the given objnum (NB: needs to know old value).
Returns objnums for all the children in the objnum passed. If the object was a leaf node (ie: no children) you'll get a 0 back.
Returns objnums for all the parents in the objnum passed. If the object had no parents (it was the root collection) you'll get a 0 back.
Returns objnums for all the anchors in the document passed.
Inserts an object on the HyperWave server. Returns object ID of the new object.
OBJRECORD should be in the form Attribute=AttributeValue\nAttr2=Value2 and must contain certain parameters such as the parent object, name, document type, etc. It is suggested that you use one of the other insert_* commands as they provide a friendlier interface. This command is provided primarily for completeness.
OBJRECORD
Attribute=AttributeValue\nAttr2=Value2
Inserts a collection on the HyperWave server. Returns object ID of the new collection.
PARENT_OBJNUM is the object number (probably returned from get_objnum_by_name() of the collection to insert this collection into. NAME is the name attribute, this will become the apparent URL to somebody using the WaveMaster interface.
PARENT_OBJNUM
NAME
OTHER_PARAMS should be in the form Attribute=AttributeValue\nAttr2=Value2 and so on. You might particularly want to set a Title for the collection.
OTHER_PARAMS
Adds a new picture. NOT YET IMPLEMENTED.
Adds a new text object (no anchors). NOT YET IMPLEMENTED.
Adds a new html object (we parse the anchors). NOT YET IMPLEMENTED.
Returns a human-readable string describing the previous server error.
Bek Oberin <gossamer@tertius.net.au>
Copyright (c) 1998 Bek Oberin. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
4 POD Errors
The following errors were encountered while parsing the POD:
'=item' outside of any '=over'
You forgot a '=back' before '=head1'
To install HyperWave::CSP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HyperWave::CSP
CPAN shell
perl -MCPAN -e shell install HyperWave::CSP
For more information on module installation, please visit the detailed CPAN module installation guide.