Why not adopt me?
This distribution is up for adoption!
If you're interested then please contact the PAUSE module admins via
email.
NAME
CGI::Untaint::country - validate a country code or name
SYNOPSIS
use CGI::Untaint;
my $handler = CGI::Untaint->new($q->Vars);
# submit:
$country_code2 = $handler->extract(-as_country => 'country'); # 2 letter code e.g. 'uk'
$country_code2 = $handler->extract(-as_countrycode => 'country'); # same as above
$country_name = $handler->extract(-as_countryname => 'country'); # name e.g. 'United Kingdom'
$country_code3 = $handler->extract(-as_countrycode3 => 'country'); # 3 letter code e.g. 'gbr'
$country_code2 = $handler->extract(-as_to_countrycode => 'country'); # name
$country_code3 = $handler->extract(-as_to_countrycode3 => 'country'); # name
$country_codenum = $handler->extract(-as_countrynumber => 'country'); # numeric code e.g. '064'
$country_codenum = $handler->extract(-as_to_countrynumber => 'country'); # name
DESCRIPTION
Verifies that the submitted value is a valid ISO 3166-1 country code, or a known name. See Locale::Country.
METHODS
- is_valid
AUTHOR
David Baird, <cpan@riverside-cms.co.uk>
BUGS
Please report any bugs or feature requests to bug-cgi-untaint-country@rt.cpan.org
, or through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
ACKNOWLEDGEMENTS
COPYRIGHT & LICENSE
Copyright 2005 David Baird, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.