CGI::Untaint::countryname


CGI-Untaint-country documentation Contained in the CGI-Untaint-country distribution.

Index


  • Code Index:

    is_valid

  • CGI-Untaint-country documentation Contained in the CGI-Untaint-country distribution.

    package CGI::Untaint::countryname;
    use warnings;
    use strict;
    use Locale::Country();
    
    use base 'CGI::Untaint::printable';
    
    
    sub is_valid {
        my ( $self ) = @_;
    
        # name in, name out
        return Locale::Country::country2code( $self->value ) ? 1 : undef;
    }
    
    1;