Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    Geo::CountryFlags 1.00

    Download button

    No screenshots available
    Downloads: 298  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Fair (2.7/5)
    4 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Michael Robinton | More programs
    Perl Artistic License / FREE
    December 21st, 2007, 09:59 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    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,[flag_dir])

    default:
    flag_dir = ./flags
    retrieve 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 [default] 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);
    ....
    }

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    fetch flag gif | country flags | Perl module | fetch | country | flags

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM