| 1 | package CGI::Untaint::integer; | ||
| 2 | |||
| 3 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use base 'CGI::Untaint::object'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 0 | ▶ | sub _untaint_re { qr/^([+-]?\d+)$/ } |
|
Subroutine
_untaint_re: not called CC=1 SCAR=6.9
| |||
| 6 | |||
| 7 | =head1 NAME | ||
| 8 | |||
| 9 | CGI::Untaint::integer - validate an integer | ||
| 10 | |||
| 11 | =head1 SYNOPSIS | ||
| 12 | |||
| 13 | my $age = $handler->extract(-as_integer => 'age'); | ||
| 14 | |||
| 15 | =head1 DESCRIPTION | ||
| 16 | |||
| 17 | This Input Handler verifies that it is dealing with an integer. | ||
| 18 | The integer can be positive or negative, but only in a basic format | ||
| 19 | (i.e. a string of digits). It will not accept exponentials. | ||
| 20 | |||
| 21 | =head1 AUTHOR | ||
| 22 | |||
| 23 | Tony Bowden, E<lt>kasei@tmtm.comE<gt>. | ||
| 24 | |||
| 25 | =head1 COPYRIGHT | ||
| 26 | |||
| 27 | Copyright (C) 2001 Tony Bowden. All rights reserved. | ||
| 28 | |||
| 29 | This module is free software; you can redistribute it and/or modify | ||
| 30 | it under the same terms as Perl itself. | ||
| 31 | |||
| 32 | =cut | ||
| 33 | |||
| 34 | 1 | 1; | |