Branch Coverage

blib/lib/CGI/Untaint/Facebook.pm
Criterion Covered Total %
branch 18 26 69.2


line true false branch
58 0 13 unless (defined $value)
66 1 12 if (length $value == 0)
71 12 0 if ($value =~ m[([a-zA-Z0-9\-/\.:\?&_=#!]+)]) { }
78 2 10 if ($value =~ m[^http://www.facebook.com/(.+)]) { }
0 10 elsif ($value =~ /^www\.facebook\.com/) { }
6 4 elsif (not $value =~ m[^https://(www|m).facebook.com/]) { }
88 0 4 unless ($self->SUPER::is_valid)
96 0 12 if ($ENV{'HTTP_ACCEPT_LANGUAGE'})
108 5 7 unless ($webdoc->is_success)
109 1 4 if ($error_code == 301 || $error_code == 302 and $webdoc->as_string =~ /^location: (.+)$/im) { }
0 4 elsif ($error_code != 404) { }
112 0 1 if ($location =~ m[^https?://(www|m).facebook.com/pages/.+]) { }
117 1 0 if ($location =~ m[^https?://(www|m).facebook.com/login.php\?next=\Q$e\E])