line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catalyst::Plugin::Markdown; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
44727
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
35
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
27
|
|
5
|
1
|
|
|
1
|
|
5
|
use base 'Class::Data::Inheritable'; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
873
|
|
6
|
1
|
|
|
1
|
|
1353
|
use Text::Markdown; |
|
1
|
|
|
|
|
110715
|
|
|
1
|
|
|
|
|
227
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
__PACKAGE__->mk_classdata('markdown'); |
11
|
|
|
|
|
|
|
__PACKAGE__->markdown( Text::Markdown->new ); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub setup { |
14
|
0
|
|
|
0
|
0
|
|
my $c = shift; |
15
|
|
|
|
|
|
|
|
16
|
0
|
|
0
|
|
|
|
$c->config->{markdown}->{empty_element_suffix} ||= ''; |
17
|
0
|
|
0
|
|
|
|
$c->config->{markdown}->{tab_width} ||= ''; |
18
|
|
|
|
|
|
|
|
19
|
0
|
|
|
|
|
|
return $c->NEXT::setup(@_); |
20
|
|
|
|
|
|
|
}; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
1; |
23
|
|
|
|
|
|
|
__END__ |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 NAME |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
Catalyst::Plugin::Markdown - Markdown for Catalyst |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 SYNOPSIS |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
# include it in plugin list |
32
|
|
|
|
|
|
|
use Catalyst qw/Markdown/; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
my $html = $c->markdown->markdown($text); |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 DESCRIPTION |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
Persistent Markdown processor for Catalyst. |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 METHODS |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head2 $c->markdown; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
Returns a ready to use L<Text::Markdown> object. |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 SEE ALSO |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
L<Catalyst::Manual>, L<Catalyst::Test>, L<Catalyst::Request>, |
49
|
|
|
|
|
|
|
L<Catalyst::Response>, L<Catalyst::Helper>, L<Text::Markdown> |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 AUTHOR |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
Christopher H. Laco, <claco@chrislaco.com> |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 LICENSE |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
This library is free software . You can redistribute it and/or modify |
58
|
|
|
|
|
|
|
it under the same terms as perl itself. |