| 1 | package CGI::Untaint::asin; | ||
| 2 | |||
| 3 | 1 | $VERSION = '1.02'; | |
| 4 | |||
| 5 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 1 | ▶ | use base 'CGI::Untaint::object'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 0 | ▶ | sub _untaint_re { |
|
Subroutine
_untaint_re: not called CC=1 SCAR=6.9
| |||
| 9 | 0 | qr/^([\d\w]\d{3}[\d\w]{6})$/i; | |
| 10 | } | ||
| 11 | |||
| 12 | 1 | 1; | |
| 13 | |||
| 14 | =head1 NAME | ||
| 15 | |||
| 16 | CGI::Untaint::asin - validate an Amazon ID | ||
| 17 | |||
| 18 | =head1 SYNOPSIS | ||
| 19 | |||
| 20 | use CGI::Untaint; | ||
| 21 | my $handler = CGI::Untaint->new($q->Vars); | ||
| 22 | |||
| 23 | my $url = $handler->extract( -as_asin => 'id' ); | ||
| 24 | |||
| 25 | =head1 DESCRIPTION | ||
| 26 | |||
| 27 | This CGI::Untaint input handler verifies that it is dealing with a | ||
| 28 | plausible Amazon ID (asin). It does not (yet?) check that this is a *real* | ||
| 29 | asin, just that it looks like one. | ||
| 30 | |||
| 31 | =head1 SEE ALSO | ||
| 32 | |||
| 33 | L<CGI::Untaint> | ||
| 34 | |||
| 35 | =head1 AUTHOR | ||
| 36 | |||
| 37 | Tony Bowden | ||
| 38 | |||
| 39 | =head1 BUGS and QUERIES | ||
| 40 | |||
| 41 | Please direct all correspondence regarding this module to: | ||
| 42 | bug-CGI-Untaint-asin@rt.cpan.org | ||
| 43 | |||
| 44 | =head1 COPYRIGHT | ||
| 45 | |||
| 46 | Copyright (C) 2004-2005 Tony Bowden. | ||
| 47 | |||
| 48 | This program is free software; you can redistribute it and/or modify it under | ||
| 49 | the terms of the GNU General Public License; either version 2 of the License, | ||
| 50 | or (at your option) any later version. | ||
| 51 | |||
| 52 | This program is distributed in the hope that it will be useful, but WITHOUT | ||
| 53 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
| 54 | FOR A PARTICULAR PURPOSE. | ||
| 55 | |||
| 56 | =cut | ||