NAME
WWW::Yandex::BarTIC - Query Yandex citation index (Яндекс ТИЦ in russian)
VERSION
Version 0.04
SYNOPSIS
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');
DESCRIPTION
The WWW::Yandex::BarTIC
is a class implementing a interface for querying yandex citation index.
It uses LWP::UserAgent for making request to Yandex.
FUNCTIONS
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
METHODS
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:
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
.
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.
ATTRIBUTES
ua
$yb->ua(LWP::UserAgent->new);
$yb->ua->agent('MyAgent');
Get/Set LWP::UserAgent object for making request to Yandex
AUTHOR
Alex, <alexbyk at cpan.org>
BUGS
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.
SUPPORT
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)
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
LICENSE AND COPYRIGHT
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:
- Around line 62:
Non-ASCII character seen before =encoding in '(Яндекс'. Assuming UTF-8