line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::Widget::Constraint::All; |
2
|
|
|
|
|
|
|
|
3
|
88
|
|
|
88
|
|
97390
|
use warnings; |
|
88
|
|
|
|
|
237
|
|
|
88
|
|
|
|
|
3705
|
|
4
|
88
|
|
|
88
|
|
622
|
use strict; |
|
88
|
|
|
|
|
222
|
|
|
88
|
|
|
|
|
3749
|
|
5
|
88
|
|
|
88
|
|
543
|
use base 'HTML::Widget::Constraint'; |
|
88
|
|
|
|
|
212
|
|
|
88
|
|
|
|
|
23226
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 NAME |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
HTML::Widget::Constraint::All - All Constraint |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 SYNOPSIS |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
my $c = $widget->constraint( 'All', 'foo', 'bar' ); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 DESCRIPTION |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
All named fields are required. |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 METHODS |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head2 process |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=cut |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub process { |
26
|
7
|
|
|
7
|
1
|
16
|
my ( $self, $w, $params ) = @_; |
27
|
7
|
|
|
|
|
15
|
my $results = []; |
28
|
7
|
|
|
|
|
15
|
for my $name ( @{ $self->names } ) { |
|
7
|
|
|
|
|
44
|
|
29
|
13
|
50
|
0
|
|
|
193
|
push @$results, |
|
|
100
|
100
|
|
|
|
|
30
|
|
|
|
|
|
|
HTML::Widget::Error->new( |
31
|
|
|
|
|
|
|
{ name => $name, message => $self->mk_message } ) |
32
|
|
|
|
|
|
|
if $self->not |
33
|
|
|
|
|
|
|
? ( defined $params->{$name} && length $params->{$name} ) |
34
|
|
|
|
|
|
|
: ( !defined $params->{$name} || !length( $params->{$name} ) ); |
35
|
|
|
|
|
|
|
} |
36
|
7
|
|
|
|
|
103
|
return $results; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 AUTHOR |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Sebastian Riedel, C |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 LICENSE |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
This library is free software, you can redistribute it and/or modify it under |
46
|
|
|
|
|
|
|
the same terms as Perl itself. |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=cut |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1; |