Namespace - a container for namespaces
The purpose of this module is to create OO interface to namespace registration and therefore add the layer of abstraction for any namespace related operation. All perfSONAR-PS classes should work with the instance of this class and avoid using explicit namespace declaration.
use perfSONAR_PS::XML::Namespace; # create Namespace object with default URIs $ns = perfSONAR_PS::XML::Namespace->new(); # overwrite Namespace object with custom URIs $nss = {'pinger' => 'http://newpinger/namespace/'}; $ns = perfSONAR_PS::XML::Namespace->new(-hash => $nss); # overwrite only specific Namespace with custom URI $ns = perfSONAR_PS::XML::Namespace->new(-pinger => 'http://newpinger/namespace/'); $pinger_uri = $ns->getNsByKey('pinger'); ## get URI by key $ns->setNsByKey('pinger' => 'http://newpinger/namespace/'); ## set URI by key
There are many get/set methods
Creates a new object, pass hash ref as collection of namespaces or new(-pinger => http://ggf.org/ns/nmwg/tools/pinger/2.0/", 'nmwgr' => "http://ggf.org/ns/nmwg/result/2.0/")
Returns namespace string by id of the namespace, where kyes are: 'nmwg', 'nmwgr 'nmwgt' ( aliased as 'topo' too),'nmwgtopo3' 'nmtl3','nmtl4', 'nmtm' 'select', 'average' 'traceroute','snmp', 'ping', 'owamp', 'netutil', 'bwctl','pinger', 'iperf
Might be utized as Class method: my $URI = Namespace::getNsByKey($key);
Sets namespace URI string by id of the namespace or defnies the new one
To join the 'perfSONAR-PS' mailing list, please visit:
https://mail.internet2.edu/wws/info/i2-perfsonar
The perfSONAR-PS subversion repository is located at:
https://svn.internet2.edu/svn/perfSONAR-PS
Questions and comments can be directed to the author, or the mailing list.
Maxim Grigoriev, <maxim@fnal.gov>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
To install perfSONAR_PS::Time, copy and paste the appropriate command in to your terminal.
cpanm
cpanm perfSONAR_PS::Time
CPAN shell
perl -MCPAN -e shell install perfSONAR_PS::Time
For more information on module installation, please visit the detailed CPAN module installation guide.