Net::Domain::SMD - info from one SMD structure
Net::Domain::SMD is extended by Net::Domain::SMD::File
# end-user route to collect the info my $tmch = Net::Domain::TMCH->new(%options); my $smdf = $tmch->smd($filename); my $smdf = $tmch->smd($node); # XML::LibXML::Element my $smdf = $tmch->smd($string); # bytes # Data::Dumper is your friend foreach my $court ($smd->courts) { print $court->{courtName}, "\n"; print Dumper $court; } foreach my $trademark ($smd->trademarks) { print $trademark->{markName}, "\n"; my $holders = $trademark->{holder} || []; foreach my $holder (@$holders) { print "Holder: $holder->{name}\n"; } } foreach my $treaty ($smd->treaties) ...
Draft RFC http://tools.ietf.org/html/draft-lozano-tmch-func-spec-06 SMD information is packaged. This object represents one file in wrapped format.
Input is an XML::LibXML::Element, which contains a signedMark structure. The OPTIONS are passed on to new().
-Option --Default schemas <required>
-Option --Default data <required> payload <required>
Returns the XML::LibXML::Element which contains the whole SMD structure.
The following methods try to be smart, to hide complexities in the XML structure, simplifying the main program.
Returns the certificates as contained in the SMD file.
-Option--Default issuer <any issuer>
Limit to the certificates of the issuer.
Returns a list of HASHes, each representing one court. See examples/mark-templ.pl
example:
foreach my $court ($smd->courts) { print $court->{courtName}, "\n"; print Dumper $court; }
Returns the timestamp reflecting the 'notBefore' field, as string. When "auto_datetime" is enabled, this will return a DateTime object.
The value of from() converted into seconds from epoch.
Returns the issuer information, as a HASH.
Returns a list of HASHes, each representing one trademark. See examples/mark-templ.pl
foreach my $trademark ($smd->trademarks) { print $trademark->{markName}, "\n"; my $holders = $trademark->{holder} || []; foreach my $holder (@$holders) { print "Holder: $holder->{name}\n"; } }
Returns a list of HASHes, each representing one treaty or statute (one element of type "treatyOrStatute". See examples/mark-templ.pl
Returns the timestamp reflecting the 'notAfter' field, as string. When "auto_datetime" is enabled, this will return a DateTime object.
The value of until() converted into seconds from epoc.
Converts a time string into a DateTime object. Accepted time-STRINGs are like time stamps in the SMD file headers, but also the ISO values inside an object.
This module is part of Net-Domain-TMCH distribution version 0.17, built on January 13, 2014. Development was supported by NIC.at, the Austrian Domainname Registry.
Website: F<http://perl.overmeer.net/net-domain-tmch/>
The documentation and interface style is consistent with a large set of modules, belonging to the XML::Compile suite.
Copyrights 2013-2014 by [Mark Overmeer]. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html
To install Net::Domain::TMCH, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Domain::TMCH
CPAN shell
perl -MCPAN -e shell install Net::Domain::TMCH
For more information on module installation, please visit the detailed CPAN module installation guide.