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