line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CSS::Selector; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
$VERSION = 1.01; |
4
|
|
|
|
|
|
|
|
5
|
8
|
|
|
8
|
|
43
|
use strict; |
|
8
|
|
|
|
|
17
|
|
|
8
|
|
|
|
|
249
|
|
6
|
8
|
|
|
8
|
|
44
|
use warnings; |
|
8
|
|
|
|
|
14
|
|
|
8
|
|
|
|
|
1045
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub new { |
10
|
90
|
|
|
90
|
1
|
320755
|
my $class = shift; |
11
|
90
|
|
|
|
|
290
|
my $self = bless {}, $class; |
12
|
|
|
|
|
|
|
|
13
|
90
|
|
|
|
|
253
|
$self->{options} = shift; |
14
|
90
|
|
100
|
|
|
363
|
$self->{name} = $self->{options}->{name} || 'NO_NAME'; |
15
|
90
|
|
50
|
|
|
457
|
$self->{adaptor} = $self->{options}->{adaptor} || 'CSS::Adaptor'; |
16
|
|
|
|
|
|
|
|
17
|
90
|
|
|
|
|
390
|
return $self; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub set_adaptor { |
21
|
92
|
|
|
92
|
1
|
128
|
my $self = shift; |
22
|
92
|
|
|
|
|
134
|
my $adaptor = shift; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
# set adaptor |
25
|
92
|
|
|
|
|
906
|
$self->{adaptor} = $adaptor; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
__END__ |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 NAME |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
CSS::Selector - A selector in a CSS object tree |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 SYNOPSIS |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
use CSS; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 DESCRIPTION |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
This module represents a selector in a CSS object tree. |
43
|
|
|
|
|
|
|
Read the CSS.pm pod for information about the CSS object tree. |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 METHODS |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head2 CONSTRUCTORS |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=over 4 |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=item C<new()> or C<new( { ..options.. } )> |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
This constructor returns a new C<CSS::Selector> object, with |
54
|
|
|
|
|
|
|
an optional hash of options. |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
name selector name (as string) |
57
|
|
|
|
|
|
|
adaptor adaptor to use for serialization |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=back |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head2 ACCESSORS |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=over 4 |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=item C<set_adaptor( 'CSS::Adaptor::Foo' )> |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
This method sets the current adaptor for the object. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=back |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 AUTHOR |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
Copyright (C) 2003-2004, Cal Henderson <cal@iamcal.com> |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 SEE ALSO |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
L<CSS>, http://www.w3.org/TR/REC-CSS1 |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=cut |
80
|
|
|
|
|
|
|
|