XRI::Descriptor::LocalAccess - Local access objects from an XRI Descriptor
use XRI::Descriptor::LocalAccess; my $localAccess = XRI::Descriptor::LocalAccess->new; $localAccess->service('xri:$r.a/X2R'); # sets service $localAccess->addType('text/html'); # sets media types $localAccess->addType('image/jpeg'); $localAccess->uris(['http://www.idcommons.net/', 'http://www.2idi.com/']);
XRI::Descriptor generates XRI::Descriptor::LocalAccess objects when parsing an XRIDescriptor XML file. These objects, described in the XML Schema for XRIDescriptor, have three fields:
service -- optional. Indicates the type of service. URI -- 1 or more. Indicates URIs at which service can be requested. type -- 0 or more. MIME types for media supported by service.
Constructor. Creates an unpopulated object.
service($service) uris(\@uris) types(\@types)
Eugene Eric Kim, <eekim@blueoxen.org>
XRI::Descriptor
To install XRI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XRI
CPAN shell
perl -MCPAN -e shell install XRI
For more information on module installation, please visit the detailed CPAN module installation guide.