WWW::Yandex::BarTIC - Query Yandex citation index (Яндекс ТИЦ in russian)
Version 0.04
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');
The WWW::Yandex::BarTIC is a class implementing a interface for querying yandex citation index.
WWW::Yandex::BarTIC
It uses LWP::UserAgent for making request to Yandex.
get_tic
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.
new
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:
ua
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"
get
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 undef.
undef
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.
HTTP::Response
LWP::UserAgent::get
$yb->ua(LWP::UserAgent->new); $yb->ua->agent('MyAgent');
Get/Set LWP::UserAgent object for making request to Yandex
Alex, <alexbyk at cpan.org>
<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.
bug-www-yandex-bartic at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc WWW::Yandex::BarTIC
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=WWW-Yandex-BarTIC
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/WWW-Yandex-BarTIC
CPAN Ratings
http://cpanratings.perl.org/d/WWW-Yandex-BarTIC
Search CPAN
http://search.cpan.org/dist/WWW-Yandex-BarTIC/
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.
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in '(Яндекс'. Assuming UTF-8
To install WWW::Yandex::BarTIC, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Yandex::BarTIC
CPAN shell
perl -MCPAN -e shell install WWW::Yandex::BarTIC
For more information on module installation, please visit the detailed CPAN module installation guide.