WebService-CIA
view release on metacpan or search on metacpan
lib/WebService/CIA.pm view on Meta::CPAN
The field name is very case and punctuation sensitive.
It returns the value of the field, or C<undef> if the field or country isn't
in the store.
Note that when using WebService::CIA::Store::Web, C<get> will also return C<undef> if
there is an error getting the page.
=item C<get_hashref(\@countries, \@fields)>
This method takes two arguments: an arrayref of country codes and an arrayref
of field names.
It returns a hashref of the form
{
'country1' => {
'field1' => 'value',
'field2' => 'value'
},
'country2' => {
'field1' => 'value',
'field2' => 'value'
}
}
=item C<get_all_hashref(\@countries)>
Get all the fields available for countries.
It takes one argument, an arrayref of country codes.
It returns a hashref similar to the one from C<get_hashref> above,
containing all the fields available for each country.
=item C<source()>
Get a reference to the WebService::CIA::Source object in use.
=back
=head1 CONFIGURATION VARIABLES
=over 4
=item C<$WebService::CIA::base_url>
Sets the base URL for the Factbook (currently
"https://www.cia.gov/library/publications/the-world-factbook/"). If the
Factbook changes location, this can be changed to point to the new location
(assuming the relative structure of the Factbook is unchanged).
=back
=head1 AUTHOR
Ian Malpass (ian-cpan@indecorous.com)
=head1 COPYRIGHT
Copyright 2003-2007, Ian Malpass
This library is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
The CIA World Factbook's copyright information page
(L<https://www.cia.gov/library/publications/the-world-factbook/docs/contributor_copyright.html>)
states:
The Factbook is in the public domain. Accordingly, it may be copied
freely without permission of the Central Intelligence Agency (CIA).
=head1 SEE ALSO
WebService::CIA::Parser, WebService::CIA::Source::DBM, WebService::CIA::Source::Web
=cut
( run in 1.225 second using v1.01-cache-2.11-cpan-df04353d9ac )