line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
###
|
3
|
|
|
|
|
|
|
# CSS::SAC::Condition::Negative - SAC NegativeConditions
|
4
|
|
|
|
|
|
|
# Robin Berjon
|
5
|
|
|
|
|
|
|
# 24/02/2001
|
6
|
|
|
|
|
|
|
###
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
package CSS::SAC::Condition::Negative;
|
9
|
2
|
|
|
2
|
|
10
|
use strict;
|
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
81
|
|
10
|
2
|
|
|
2
|
|
10
|
use vars qw($VERSION);
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
106
|
|
11
|
|
|
|
|
|
|
$VERSION = $CSS::SAC::VERSION || '0.03';
|
12
|
|
|
|
|
|
|
|
13
|
2
|
|
|
2
|
|
10
|
use base qw(CSS::SAC::Condition);
|
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
180
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
#---------------------------------------------------------------------#
|
17
|
|
|
|
|
|
|
# build the fields for an array based object
|
18
|
|
|
|
|
|
|
#---------------------------------------------------------------------#
|
19
|
2
|
|
|
|
|
21
|
use Class::ArrayObjects extend => {
|
20
|
|
|
|
|
|
|
class => 'CSS::SAC::Condition',
|
21
|
|
|
|
|
|
|
with => [qw(
|
22
|
|
|
|
|
|
|
_cond_
|
23
|
|
|
|
|
|
|
)],
|
24
|
2
|
|
|
2
|
|
10
|
};
|
|
2
|
|
|
|
|
4
|
|
25
|
|
|
|
|
|
|
#---------------------------------------------------------------------#
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
### Constructor #######################################################
|
31
|
|
|
|
|
|
|
# #
|
32
|
|
|
|
|
|
|
# #
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
#---------------------------------------------------------------------#
|
36
|
|
|
|
|
|
|
# CSS::SAC::Condition::Negative->new($type,$cond)
|
37
|
|
|
|
|
|
|
# creates a new sac NegativeCondition object
|
38
|
|
|
|
|
|
|
#---------------------------------------------------------------------#
|
39
|
|
|
|
|
|
|
sub new {
|
40
|
2
|
50
|
|
2
|
1
|
16
|
my $class = ref($_[0])?ref(shift):shift;
|
41
|
2
|
|
|
|
|
5
|
my $type = shift; # should be one of the content conditions
|
42
|
2
|
|
|
|
|
4
|
my $cond = shift;
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
# create a condition
|
45
|
2
|
|
|
|
|
12
|
my $ncond = $class->SUPER::new($type);
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
# add our fields
|
48
|
2
|
|
|
|
|
12
|
$ncond->[_cond_] = $cond;
|
49
|
|
|
|
|
|
|
|
50
|
2
|
|
|
|
|
18
|
return $ncond;
|
51
|
|
|
|
|
|
|
}
|
52
|
|
|
|
|
|
|
#---------------------------------------------------------------------#
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
# #
|
56
|
|
|
|
|
|
|
# #
|
57
|
|
|
|
|
|
|
### Constructor #######################################################
|
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
### Accessors #########################################################
|
62
|
|
|
|
|
|
|
# #
|
63
|
|
|
|
|
|
|
# #
|
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
# aliases
|
66
|
|
|
|
|
|
|
*CSS::SAC::Condition::Negative::getCondition = \&Condition;
|
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
#---------------------------------------------------------------------#
|
70
|
|
|
|
|
|
|
# my $cond = $ncond->Condition()
|
71
|
|
|
|
|
|
|
# $ncond->Condition($cond)
|
72
|
|
|
|
|
|
|
# get/set the condition's sub condition
|
73
|
|
|
|
|
|
|
#---------------------------------------------------------------------#
|
74
|
|
|
|
|
|
|
sub Condition {
|
75
|
2
|
50
|
|
2
|
1
|
27
|
(@_==2) ? $_[0]->[_cond_] = $_[1] :
|
76
|
|
|
|
|
|
|
$_[0]->[_cond_];
|
77
|
|
|
|
|
|
|
}
|
78
|
|
|
|
|
|
|
#---------------------------------------------------------------------#
|
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
# #
|
82
|
|
|
|
|
|
|
# #
|
83
|
|
|
|
|
|
|
### Accessors #########################################################
|
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
1;
|
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=pod
|
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head1 NAME
|
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
CSS::SAC::Condition::Negative - SAC NegativeConditions
|
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head1 SYNOPSIS
|
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
see CSS::SAC::Condition
|
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head1 DESCRIPTION
|
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
This is a subclass of CSS::SAC::Condition, look there for more
|
102
|
|
|
|
|
|
|
documentation. This class adds the following methods (the spec
|
103
|
|
|
|
|
|
|
equivalents are available as well, just prepend 'get'):
|
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=head1 METHODS
|
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=over 4
|
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=item * CSS::SAC::Condition::Negative->new($type,$cond)
|
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=item * $cond->new($type,$cond)
|
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
Creates a new negative condition.
|
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=item * $ccond->Condition([$cond])
|
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
get/set the condition's sub condition
|
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=back
|
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=head1 AUTHOR
|
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
Robin Berjon
|
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
This module is licensed under the same terms as Perl itself.
|
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=cut
|
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
|