line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CGI::Untaint::us_date; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
30157
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
31
|
|
4
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
34
|
|
5
|
1
|
|
|
1
|
|
5
|
use base qw/CGI::Untaint::date/; |
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
902
|
|
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
|
|
|
|
|
|
|
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
|
|
|
0
|
1
|
|
sub date_format { 'US' } |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 AUTHOR |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
mike south, C<< >> |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 BUGS |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Please report any bugs or feature requests to C, or through |
48
|
|
|
|
|
|
|
the web interface at L. 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 |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
L |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=item * CPAN Ratings |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
L |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=item * Search CPAN |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
L |
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
|
|
|
|
|
|
|
1; # End of CGI::Untaint::us_date |