Net::Yadis

Performs the Yadis service discovery protocol
Download

Net::Yadis Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Dag Arneson
  • Publisher web site:
  • http://search.cpan.org/~arnesond/Net-OpenID-JanRain-1.1.1/lib/Net/OpenID/JanRain/Consumer.pm

Net::Yadis Tags


Net::Yadis Description

Performs the Yadis service discovery protocol Net::Yadis is a Perl module that performs the Yadis service discovery protocol, and parses XRDS xml documents.MethodsdiscoverThis constructor performs the discovery protocol on a url and returns a yadis object that parses the XRDS document for you. eval { $yadis=Net::Yadis->discover($url); } warn "Yadis failed: $@" if $@;Will die on errors: HTTP errors, missing Yadis magic, malformed XRDSnewYou may also skip discovery and go straight to xrds parsing with the new constructor. $yadis = Net::Yadis->new($yadis_url, $xrds_url, $xml);$yadis_url the identity URL$xrds_url where we got the xrds document$xml the XRDS xml as textWe don't trap death from XML::XPath; malformed xml causes thisAccessor methodsxml The XML text of the XRDS document.url The Yadis URL.xrds_url The URL where the XRDS document was found.xrds_xpathThe XML::XPath object used internally is made available to allow custom XPath queries.servicesAn array of Net::Yadis::Service objects representing the services advertised in the XRDS file.filter_servicesPass in a filter function reference to this guy. The filter function must take a Net::Yadis::Service object, and return a scalar of some sort or undef. The scalars returned from the filter will be returned in an array from this method.Example my $filter = sub { my $service = shift; if ($service->is_type($typere)) { # here we simply return the service object, but you may return # something else if you wish to extract the data and discard # the xpath object contained in the service object. return $service; } else { return undef; } }; my $typeservices = $yadis->filter_services($filter);services_of_typeA predefined filtering method that takes a regexp for filtering service types.service_of_typeHey, a perl generator! sequential calls will return the services one at a time, in ascending priority order with ties randomly decided. make sure that the type argument is identical for each call, or the list will start again from the top. You'll have to store the yadis object in a session for this guy to be useful. Requirements: · Perl


Net::Yadis Related Software