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