Untaint/integer.pm

filter: Statementstmt 87.5% 7 / 8 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 2 / 3 Podpod n/a totaltotal 81.8% 9 / 11 CC 1 SCAR 2.9
CC
1
Cov
88%
_untaint_re
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« Untaint/hex.pm ↑ Summary Untaint/printable.pm »
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;
« Untaint/hex.pm ↑ Summary Untaint/printable.pm »