line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CSS::Parse; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
$VERSION = 1.01; |
4
|
|
|
|
|
|
|
|
5
|
8
|
|
|
8
|
|
43
|
use strict; |
|
8
|
|
|
|
|
17
|
|
|
8
|
|
|
|
|
290
|
|
6
|
8
|
|
|
8
|
|
39
|
use warnings; |
|
8
|
|
|
|
|
16
|
|
|
8
|
|
|
|
|
1387
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# Create an empty object |
9
|
|
|
|
|
|
|
sub new { |
10
|
2
|
|
|
2
|
0
|
1215
|
my $class = shift; |
11
|
2
|
|
|
|
|
8
|
my $self = bless {}, $class; |
12
|
|
|
|
|
|
|
|
13
|
2
|
|
|
|
|
13
|
$self->{parent} = undef; |
14
|
|
|
|
|
|
|
|
15
|
2
|
|
|
|
|
6
|
return $self; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
# The main parser |
19
|
|
|
|
|
|
|
sub parse_string { |
20
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
21
|
0
|
|
|
|
|
|
my $string = shift; |
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
|
|
|
die("CSS::Parse is not a valid parser! Use a subclass instead (CSS::Parse::*)\n"); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
__END__ |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head1 NAME |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
CSS::Parse - Template class for CSS parser modules |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 DESCRIPTION |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
This module should not be used directly. Instead, use the CSS::Parse::* modules. |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 AUTHOR |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Copyright (C) 2003-2004, Cal Henderson <cal@iamcal.com> |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 SEE ALSO |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
L<CSS> |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=cut |