blib/lib/FormValidator/Lite/Constraint/URL.pm

filter: Statementstmt 100% 12 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 100% 16 / 16 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/FormValidator/Lite/Constraint/Japanese.pm ↑ Summary blib/lib/FormValidator/Lite/Messages/en.pm »
1 package FormValidator::Lite::Constraint::URL;
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use FormValidator::Lite::Constraint;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 # this regexp is taken from http://www.din.or.jp/~ohzaki/perl.htm#httpURL
7 # thanks to ohzaki++
8 rule 'HTTP_URL' => sub {
9 2 ▶ $_ =~ /^s?https?:\/\/[-_.!~*'()a-zA-Z0-9;\/?:\@&=+\$,%#]+$/
Subroutine __ANON__: called CC=1 SCAR=0.0
10 1 };
11  
12 1 1;
13 __END__
« blib/lib/FormValidator/Lite/Constraint/Japanese.pm ↑ Summary blib/lib/FormValidator/Lite/Messages/en.pm »