Geo::CountryFlagsGeo::CountryFlags can dynamically fetch flag gif's from CIA. | |
Download |
Geo::CountryFlags Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Michael Robinton
- Publisher web site:
- http://search.cpan.org/~miker/Net-DNS-Codes-0.09/Codes.pm
Geo::CountryFlags Tags
Geo::CountryFlags Description
Geo::CountryFlags can dynamically fetch flag gif's from CIA. Geo::CountryFlags can dynamically fetch flag gif's from CIA.SYNOPSIS use Geo::CountryFlags $gcf = new Geo::CountryFlags;return a local path to the flag file fetch the file from CIA if necessary and put it in the flag directory $flag_path = $gcf->get_flag($country_code,) default: flag_dir = ./flagsretrieve the CIA country code $cia_code = $gcf->cc2cia($country_code)retrieve the ISO country name $gci = new Geo::CountryFlags::ISO; $country_name = $gci->value($country_code);retrieve the CIA country name $gcc = new Geo::CountryFlags::CIA; $country_name = $gcc->value($cia_code);Provides methods to display / retrieve flag gifs dynamically from the web site of the Central Intelligence Agency. Permanently caches a local copy of the flag gif in your web site sub directory.The flags for all country codes as of module publication are included in the ./flags directory should you wish to install them. However, If LWP::Simple is installed, Geo::CountryFlags will fetch them as needed and store them in ./flags or the directory of you choice on your web site.To fetch a single flag PATH the usage is simply: my $cc = 'US'; # country code my $flag_path = Geo::CountryFlags->new->get_flag($cc); for multiple flags: $gcf = new Geo::CountryFlags; for (blah.... blah) { my $cc = function_of(blah...); my $flag_path = $gcf->get_flag($cc); .... } Requirements: · Perl
Geo::CountryFlags Related Software