blib/lib/CGI/Untaint/us_date.pm

filter: Statementstmt 91.6% 11 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 100% 1 / 1 totaltotal 88.2% 15 / 17 CC 1 SCAR 2.2
CC
1
Cov
92%
date_format
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
↑ Summary
1 package CGI::Untaint::us_date;
2  
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use base qw/CGI::Untaint::date/;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 =head1 NAME
8  
9 CGI::Untaint::us_date - CGI::Untaint::date for US-formatted dates
10  
11 =head1 VERSION
12  
13 Version 0.01
14  
15 =cut
16  
17 2 our $VERSION = '0.01';
18  
19  
20 =head1 SYNOPSIS
21  
22 Where CGI::Untaint::date has 'UK' hardcoded, this has 'US' hardcoded.
23 That is the only difference.
24  
25 use CGI::Untaint;
26 my $handler = CGI::Untaint->new($q->Vars);
27  
28 my $date = $handler->extract(-as_us_date => 'date');
29  
30 =head1 SUBROUTINES/METHODS
31  
32 =head2 date_format
33  
34 Overrides the date_format sub in CGI::Untaint::date so that
35 dates like 4/20/2112 are valid, but 20/4/2112 is an error.
36  
37 =cut
38  
39 0 ▶sub date_format { 'US' }
Subroutine date_format: not called CC=1 SCAR=6.9
Pod documented
40  
41 =head1 AUTHOR
42  
43 mike south, C<< <msouth at gmail.com> >>
44  
45 =head1 BUGS
46  
47 Please report any bugs or feature requests to C<bug-cgi-untaint-us_date at rt.cpan.org>, or through
48 the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CGI-Untaint-us_date>. I will be notified, and then you'll
49 automatically be notified of progress on your bug as I make changes.
50  
51  
52  
53  
54 =head1 SUPPORT
55  
56 You can find documentation for this module with the perldoc command.
57  
58 perldoc CGI::Untaint::us_date
59  
60  
61 You can also look for information at:
62  
63 =over 4
64  
65 =item * RT: CPAN's request tracker
66  
67 L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=CGI-Untaint-us_date>
68  
69 =item * AnnoCPAN: Annotated CPAN documentation
70  
71 L<http://annocpan.org/dist/CGI-Untaint-us_date>
72  
73 =item * CPAN Ratings
74  
75 L<http://cpanratings.perl.org/d/CGI-Untaint-us_date>
76  
77 =item * Search CPAN
78  
79 L<http://search.cpan.org/dist/CGI-Untaint-us_date/>
80  
81 =back
82  
83  
84 =head1 ACKNOWLEDGEMENTS
85  
86  
87 =head1 LICENSE AND COPYRIGHT
88  
89 Copyright 2010 mike south.
90  
91 This program is free software; you can redistribute it and/or modify it
92 under the terms of either: the GNU General Public License as published
93 by the Free Software Foundation; or the Artistic License.
94  
95 See http://dev.perl.org/licenses/ for more information.
96  
97  
98 =cut
99  
100 2 1; # End of CGI::Untaint::us_date
↑ Summary