WWW::Scraper::Wikipedia::ISO3166::Database - The interface to www.scraper.wikipedia.iso3166.sqlite
See "Synopsis" in WWW::Scraper::Wikipedia::ISO3166 for a long synopsis.
Documents the methods end-users need to access the SQLite database, www.scraper.wikipedia.iso3166.sqlite, which ships with this distro.
See "Description" in WWW::Scraper::Wikipedia::ISO3166 for a long description.
See scripts/export.as.csv.pl, scripts/export.as.html.pl and scripts/report.statistics.pl.
This module is available as a Unix-style distro (*.tgz).
See http://savage.net.au/Perl-modules.html for details.
See http://savage.net.au/Perl-modules/html/installing-a-module.html for help on unpacking and installing.
new(...) returns an object of type WWW::Scraper::Wikipedia::ISO3166::Database.
WWW::Scraper::Wikipedia::ISO3166::Database
This is the class's contructor.
Usage: WWW::Scraper::Wikipedia::ISO3166::Database -> new().
WWW::Scraper::Wikipedia::ISO3166::Database -> new()
This method takes a hash of options.
Call new() as new(option_1 => value_1, option_2 => value_2, ...).
new()
new(option_1 => value_1, option_2 => value_2, ...)
Available options:
This is the hashref of attributes passed to DBI's connect() method.
Default: {AutoCommit => 1, RaiseError => 1, sqlite_unicode => 1}
This module is a sub-class of WWW::Scraper::Wikipedia::ISO3166 and consequently inherits its methods.
Get or set the hashref of attributes passes to DBI's connect() method.
Also, attributes is an option to "new()".
Returns an arrayref of 2-letter codes of countries whose subcountry page has been downloaded to data/*$code2.html.
Returns the result of: 'select count(*) from countries'.
Returns a hashref of database statistics:
{ countries_in_db => 249, has_subcounties => 200, subcountries_in_db => 5297, subcountry_cagegories_in_db => 77, subcountry_files_downloaded => 249, subcountry_info_in_db => 352, }
Called by "report_statistics()".
Returns the result of: 'select count(*) from subcountries'.
Returns the result of: 'select count(*) from subcountry_categories'.
Returns the result of: 'select count(*) from subcountry_info'.
See "Constructor and initialization".
Returns a hashref of hashrefs for this SQL: 'select * from countries'.
The key of the hashref is the primary key (integer) of the countries table.
This is discussed further in "Methods which return hashrefs" in WWW::Scraper::Wikipedia::ISO3166.
Returns a hashref of hashrefs for this SQL: 'select * from subcountries'.
The key of the hashref is the primary key (integer) of the subcountries table.
Returns a hashref of hashrefs for this SQL: 'select * from subcountry_categories'.
The key of the hashref is the primary key (integer) of the subcountry_categories table.
Returns a hashref of hashrefs for this SQL: 'select * from subcountry_info'.
The key of the hashref is the primary key (integer) of the subcountry_info table.
This info is a text summary of each country's subcountries, and is taken literally from the 3rd column - 'Subdivisions assigned codes' - of ISO3166-2.
Logs some info for Australia. Does not call "report_statistics()".
Logs various database statistics at the info level.
Calls "get_statistics()". See that module for what this module reports.
Returns an arrayref of primary keys (integers) in the countries table, of those countries who have subcountry entries in the subcountries table.
For the database schema, etc, see "FAQ" in WWW::Scraper::Wikipedia::ISO3166.
See "References" in WWW::Scraper::Wikipedia::ISO3166.
Email the author, or log a bug on RT:
https://rt.cpan.org/Public/Dist/Display.html?Name=WWW::Scraper::Wikipedia::ISO3166.
WWW::Scraper::Wikipedia::ISO3166 was written by Ron Savage <ron@savage.net.au> in 2012.
WWW::Scraper::Wikipedia::ISO3166
Home page: http://savage.net.au/index.html.
Australian copyright (c) 2012 Ron Savage.
All Programs of mine are 'OSI Certified Open Source Software'; you can redistribute them and/or modify them under the terms of The Artistic License, a copy of which is available at: http://www.opensource.org/licenses/index.html
To install WWW::Scraper::Wikipedia::ISO3166, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Scraper::Wikipedia::ISO3166
CPAN shell
perl -MCPAN -e shell install WWW::Scraper::Wikipedia::ISO3166
For more information on module installation, please visit the detailed CPAN module installation guide.