WWW::Yandex::BarTIC - Query Yandex citation index (Ð¯Ð½Ð´ÐµÐºÑ Ð¢ÐÐ¦ in russian)
use WWW::Yandex::BarTIC 'get_tic'; # OO Style my $yb = WWW::Yandex::BarTIC->new(); my ($tic, $resp) = $yb->get('http://cpan.org'); # Function my ($tic, $resp) = get_tic('http://cpan.org');
WWW::Yandex::BarTIC is a class implementing a interface for querying yandex citation index.
It uses LWP::UserAgent for making request to Yandex.
You can use
get_tic function, but you must import it before
use WWW::Yandex::BarTIC 'get_tic'; my ($tic, $resp) = get_tic('http://mail.ru');
See "get" method for description
WWW::Yandex::BarTIC implements the following methods.
my $yb = WWW::Yandex::BarTIC->new; my $yb = WWW::Yandex::BarTIC->new(ua => LWP::UserAgent->new);
Creates a new object. If
ua attribute is empty, it will be created automatically with following defaults:
KEY DEFAULT ----------- -------------------- agent "Mozilla/5.0 (Ubuntu; X11; Linux i686; rv:9.0.1) Gecko/20100101 Firefox/9.0.1 YB/6.5.0-en"
my ($tic, $resp) = $yb->get('http://cpan.org'); my $tic = $yb->get('http://cpan.org');
Queries Yandex for a specified URL and returns TIC. If query successfull, integer value > 0 returned. If query fails for some reason (yandex unreachable, url does not begin from 'http://', undefined url passed) it returns
In list context this function returns list from two elements where first is the result as in scalar context and the second is the
HTTP::Response object (returned by
LWP::UserAgent::get). This can be usefull for debugging purposes and for querying failure details.
Get/Set LWP::UserAgent object for making request to Yandex
<alexbyk at cpan.org>
Please report any bugs or feature requests to
bug-www-yandex-bartic at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW-Yandex-BarTIC. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
You can find documentation for this module with the perldoc command.
You can also look for information at:
Copyright 2012 Alex.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.