line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CSS::Value; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
$VERSION = 1.03; |
4
|
|
|
|
|
|
|
|
5
|
8
|
|
|
8
|
|
46
|
use strict; |
|
8
|
|
|
|
|
14
|
|
|
8
|
|
|
|
|
246
|
|
6
|
8
|
|
|
8
|
|
41
|
use warnings; |
|
8
|
|
|
|
|
16
|
|
|
8
|
|
|
|
|
210
|
|
7
|
8
|
|
|
8
|
|
52
|
use overload '""' => 'to_string'; |
|
8
|
|
|
|
|
24
|
|
|
8
|
|
|
|
|
49
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub new { |
10
|
80
|
|
|
80
|
1
|
542
|
my $class = shift; |
11
|
80
|
|
|
|
|
223
|
my $self = bless {}, $class; |
12
|
|
|
|
|
|
|
|
13
|
80
|
|
|
|
|
480
|
$self->{options} = shift; |
14
|
80
|
|
|
|
|
170
|
$self->{value} = ''; |
15
|
80
|
|
|
|
|
132
|
$self->{adaptor} = 'CSS::Adaptor'; |
16
|
|
|
|
|
|
|
|
17
|
80
|
100
|
|
|
|
332
|
$self->{value} = $self->{options}->{value} if defined $self->{options}->{value}; |
18
|
80
|
100
|
|
|
|
326
|
$self->{adaptor} = $self->{options}->{adaptor} if defined $self->{options}->{adaptor}; |
19
|
|
|
|
|
|
|
|
20
|
80
|
|
|
|
|
212
|
return $self; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub to_string { |
24
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
25
|
0
|
|
|
|
|
|
my $adaptor_obj = new $self->{adaptor}; |
26
|
0
|
|
|
|
|
|
return $adaptor_obj->output_value($self); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
__END__ |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 NAME |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
CSS::Value - A property value in a CSS object tree |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 SYNOPSIS |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
use CSS; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 DESCRIPTION |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
This module represents a property value in a CSS object tree. |
44
|
|
|
|
|
|
|
Read the CSS.pm pod for information about the CSS object tree. |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 METHODS |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head2 CONSTRUCTORS |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=over 4 |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=item C<new()> or C<new( { ..options.. } )> |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
This constructor returns a new C<CSS::Value> object, with |
55
|
|
|
|
|
|
|
an optional hash of options. |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
value value string |
58
|
|
|
|
|
|
|
adaptor adaptor to use for serialization |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=back |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head2 ACCESSORS |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=over 4 |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=item C<to_string()> |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
This method is used to serialize the value. |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=back |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 AUTHOR |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Copyright (C) 2003-2004, Cal Henderson <cal@iamcal.com> |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 SEE ALSO |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
L<CSS>, http://www.w3.org/TR/REC-CSS1 |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=cut |
81
|
|
|
|
|
|
|
|