line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
############################################################################# |
2
|
|
|
|
|
|
|
# (c) by Tels 2004. Part of Convert::Wiki |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# represents an item in a list (aka or *) |
5
|
|
|
|
|
|
|
############################################################################# |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
package Convert::Wiki::Node::Item; |
8
|
|
|
|
|
|
|
|
9
|
4
|
|
|
4
|
|
43639
|
use 5.006001; |
|
4
|
|
|
|
|
16
|
|
|
4
|
|
|
|
|
161
|
|
10
|
4
|
|
|
4
|
|
21
|
use strict; |
|
4
|
|
|
|
|
15
|
|
|
4
|
|
|
|
|
155
|
|
11
|
4
|
|
|
4
|
|
24
|
use warnings; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
127
|
|
12
|
|
|
|
|
|
|
|
13
|
4
|
|
|
4
|
|
361
|
use Convert::Wiki::Node; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
129
|
|
14
|
|
|
|
|
|
|
|
15
|
4
|
|
|
4
|
|
22
|
use vars qw/$VERSION @ISA/; |
|
4
|
|
|
|
|
15
|
|
|
4
|
|
|
|
|
686
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
@ISA = qw/Convert::Wiki::Node/; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
$VERSION = '0.03'; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
############################################################################# |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub _as_wiki |
24
|
|
|
|
|
|
|
{ |
25
|
8
|
|
|
8
|
|
16
|
my ($self,$txt) = @_; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
# "* Foo bar is baz.\n" |
28
|
8
|
|
|
|
|
14
|
my $trailing = "\n"; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
# add a new line if the next node is not an item |
31
|
8
|
|
|
|
|
14
|
my $next = $self->{next}; |
32
|
8
|
100
|
100
|
|
|
45
|
$trailing .= "\n" if defined $next && $next->type() ne 'item'; |
33
|
|
|
|
|
|
|
|
34
|
8
|
|
|
|
|
40
|
'* ' . $txt . $trailing; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |
38
|
|
|
|
|
|
|
__END__ |