line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CSS::Adaptor::Debug; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
$VERSION = 1.01; |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
6
|
use CSS::Adaptor; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
38
|
|
6
|
|
|
|
|
|
|
@ISA = qw(CSS::Adaptor); |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
34
|
|
9
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
336
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
my $DIV_LINE = ('-'x50)."\n"; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub output_rule { |
14
|
1
|
|
|
1
|
1
|
2
|
my ($self, $rule) = @_; |
15
|
1
|
|
|
|
|
5
|
return "NEW RULE\n".$DIV_LINE.$rule->selectors.$rule->properties.$DIV_LINE."\n"; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub output_selectors { |
19
|
1
|
|
|
1
|
1
|
2
|
my ($self, $selectors) = @_; |
20
|
1
|
|
|
|
|
2
|
return "SELECTORS:\n".join('', map {"\t".$_->{name}."\n"} @{$selectors})."\n"; |
|
1
|
|
|
|
|
19
|
|
|
1
|
|
|
|
|
3
|
|
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub output_properties { |
24
|
1
|
|
|
1
|
1
|
2
|
my ($self, $properties) = @_; |
25
|
1
|
|
|
|
|
2
|
return "PROPERTIES:\n".join('', map {"\t".$_->{property}.":\t".$_->values.";\n"} @{$properties})."\n"; |
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
3
|
|
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub output_values { |
29
|
1
|
|
|
1
|
1
|
2
|
my ($self, $values) = @_; |
30
|
1
|
|
|
|
|
2
|
return join '', map {$_->{value}} @{$values}; |
|
1
|
|
|
|
|
25
|
|
|
1
|
|
|
|
|
2
|
|
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__END__ |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 NAME |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
CSS::Adaptor::Debug - An example adaptor for debugging CSS. |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 SYNOPSIS |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
use CSS; |
45
|
|
|
|
|
|
|
... |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 DESCRIPTION |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
This class implements a CSS::Adaptor object to display a |
50
|
|
|
|
|
|
|
stylesheet in 'debugging' style. |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 AUTHORS |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
Copyright (C) 2003-2004, Cal Henderson <cal@iamcal.com> |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 SEE ALSO |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
L<CSS>, L<CSS::Adaptor> |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=cut |