WWW::Google::CustomSearch::Page - Placeholder for Google JSON/Atom Custom Search Page.
Version 0.09
Provides the interface to the individual search page based on the search criteria.
Returns the safety level of the search.
use strict; use warnings; use WWW::Google::CustomSearch; my $api_key = 'Your_API_Key'; my $cx = 'Search_Engine_Identifier'; my $engine = WWW::Google::CustomSearch->new(api_key => $api_key, cx => $cx); my $result = $engine->search("Google"); my $page = $result->nextPage; print "Safety Level: ", $page->safe, "\n";
Returns the 'count' attribute of the search.
use strict; use warnings; use WWW::Google::CustomSearch; my $api_key = 'Your_API_Key'; my $cx = 'Search_Engine_Identifier'; my $engine = WWW::Google::CustomSearch->new(api_key => $api_key, cx => $cx); my $result = $engine->search("Google"); my $page = $result->nextPage; print "Page count: ", $page->count, "\n";
Returns the 'searchTerms' attribute of the search.
use strict; use warnings; use WWW::Google::CustomSearch; my $api_key = 'Your_API_Key'; my $cx = 'Search_Engine_Identifier'; my $engine = WWW::Google::CustomSearch->new(api_key => $api_key, cx => $cx); my $result = $engine->search("Google"); my $page = $result->nextPage; print "Search Terms: ", $page->searchTerms, "\n";
Returns the 'startIndex' attribute of the search.
use strict; use warnings; use WWW::Google::CustomSearch; my $api_key = 'Your_API_Key'; my $cx = 'Search_Engine_Identifier'; my $engine = WWW::Google::CustomSearch->new(api_key => $api_key, cx => $cx); my $result = $engine->search("Google"); my $page = $result->nextPage; print "Start Index: ", $page->startIndex, "\n";
Returns the 'title' attribute of the search.
use strict; use warnings; use WWW::Google::CustomSearch; my $api_key = 'Your_API_Key'; my $cx = 'Search_Engine_Identifier'; my $engine = WWW::Google::CustomSearch->new(api_key => $api_key, cx => $cx); my $result = $engine->search("Google"); my $page = $result->nextPage; print "Title: ", $page->title, "\n";
Returns the 'totalResults' attribute of the search.
use strict; use warnings; use WWW::Google::CustomSearch; my $api_key = 'Your_API_Key'; my $cx = 'Search_Engine_Identifier'; my $engine = WWW::Google::CustomSearch->new(api_key => $api_key, cx => $cx); my $result = $engine->search("Google"); my $page = $result->nextPage; print "Total Results: ", $page->totalResults, "\n";
Returns the 'inputEncoding' attribute of the search.
use strict; use warnings; use WWW::Google::CustomSearch; my $api_key = 'Your_API_Key'; my $cx = 'Search_Engine_Identifier'; my $engine = WWW::Google::CustomSearch->new(api_key => $api_key, cx => $cx); my $result = $engine->search("Google"); my $page = $result->nextPage; print "Input Encoding: ", $page->inputEncoding, "\n";
Returns the 'outputEncoding' attribute of the search.
use strict; use warnings; use WWW::Google::CustomSearch; my $api_key = 'Your_API_Key'; my $cx = 'Search_Engine_Identifier'; my $engine = WWW::Google::CustomSearch->new(api_key => $api_key, cx => $cx); my $result = $engine->search("Google"); my $page = $result->nextPage; print "Output Encoding: ", $page->outputEncoding, "\n";
Perform a fresh search based on the previous input data and returns WWW::Google::CustomSearch::Result object.
use strict; use warnings; use WWW::Google::CustomSearch; my $api_key = 'Your_API_Key'; my $cx = 'Search_Engine_Identifier'; my $engine = WWW::Google::CustomSearch->new(api_key => $api_key, cx => $cx); my $result = $engine->search("Google"); my $page = $result->nextPage; my $next = $page->fetch;
Mohammad S Anwar, <mohammad.anwar at yahoo.com>
<mohammad.anwar at yahoo.com>
Please report any bugs or feature requests to bug-www-google-customsearch at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW-Google-CustomSearch. I will be notified and then you'll automatically be notified of progress on your bug as I make changes.
bug-www-google-customsearch at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc WWW::Google::CustomSearch::Page
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=WWW-Google-CustomSearch
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/WWW-Google-CustomSearch
CPAN Ratings
http://cpanratings.perl.org/d/WWW-Google-CustomSearch
Search CPAN
http://search.cpan.org/dist/WWW-Google-CustomSearch/
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.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
To install WWW::Google::CustomSearch, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Google::CustomSearch
CPAN shell
perl -MCPAN -e shell install WWW::Google::CustomSearch
For more information on module installation, please visit the detailed CPAN module installation guide.