line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
3
|
|
|
3
|
|
42727
|
use strict; |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
139
|
|
2
|
3
|
|
|
3
|
|
19
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
153
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Wiki::Toolkit::Formatter::XHTMLMediaWiki; |
5
|
|
|
|
|
|
|
|
6
|
3
|
|
|
3
|
|
27
|
use base 'XHTML::MediaWiki'; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
3497
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 NAME |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
Wiki::Toolkit::Formatter::XHTMLMediaWiki - A Mediawiki-style formatter for Wiki::Toolkit. |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 VERSION |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
Version 0.04 |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=cut |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
use vars qw{$VERSION}; |
19
|
|
|
|
|
|
|
$VERSION = '0.04'; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 SYNOPSIS |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
This package implements a formatter for the Wiki::Toolkit module which attempts |
24
|
|
|
|
|
|
|
to duplicate the behavior of the Mediawiki application (a set of PHP scripts |
25
|
|
|
|
|
|
|
used by Wikipedia and friends). |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
use Wiki::Toolkit |
28
|
|
|
|
|
|
|
use Wiki::Toolkit::Store::Mediawiki; |
29
|
|
|
|
|
|
|
use Wiki::Toolkit::Formatter::XHTMLMediaWiki; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
my $store = Wiki::Toolkit::Store::Mediawiki->new( ... ); |
32
|
|
|
|
|
|
|
# See below for parameter details. |
33
|
|
|
|
|
|
|
my $formatter = Wiki::Toolkit::Formatter::XHTMLMediaWiki->new( |
34
|
|
|
|
|
|
|
store => $store |
35
|
|
|
|
|
|
|
); |
36
|
|
|
|
|
|
|
my $wiki = Wiki::Toolkit->new(store => $store, |
37
|
|
|
|
|
|
|
formatter => $formatter); |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=cut |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
use Carp qw(croak); |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 METHODS |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head2 new |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
my $formatter = Wiki::Toolkit::Formatter::XHTMLMediaWiki->new( |
48
|
|
|
|
|
|
|
store => $store |
49
|
|
|
|
|
|
|
); |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
See: L for other arguments |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=cut |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
sub new |
56
|
|
|
|
|
|
|
{ |
57
|
|
|
|
|
|
|
my ($class, %args) = @_; |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
# croak "`store' is a required argument" unless $args{store}; |
60
|
|
|
|
|
|
|
my $store = $args{store}; |
61
|
|
|
|
|
|
|
delete $args{store}; |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
my $self = $class->SUPER::new(%args); |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
$self->{store} = $store; |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
return $self; |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
1; # End of Wiki::Toolkit::Formatter::XHTMLMediaWiki |
71
|
|
|
|
|
|
|
__END__ |