line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catalyst::Helper::Doc; |
2
|
1
|
|
|
1
|
|
32913
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
40
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
4
|
1
|
|
|
1
|
|
5
|
use File::Spec; |
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
22
|
|
5
|
1
|
|
|
1
|
|
982
|
use Pod::ProjectDocs; |
|
1
|
|
|
|
|
127731
|
|
|
1
|
|
|
|
|
9
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.04'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub mk_stuff { |
10
|
0
|
|
|
0
|
0
|
|
my ( $class, $helper, $desc, $lang, $charset ) = @_; |
11
|
0
|
|
|
|
|
|
my $doc_dir = File::Spec->catfile( $helper->{base}, 'doc' ); |
12
|
0
|
|
|
|
|
|
my $lib_dir = File::Spec->catfile( $helper->{base}, 'lib' ); |
13
|
0
|
|
|
|
|
|
$helper->mk_dir($doc_dir); |
14
|
0
|
|
0
|
|
|
|
Pod::ProjectDocs->new( |
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
15
|
|
|
|
|
|
|
title => $helper->{app}, |
16
|
|
|
|
|
|
|
outroot => $doc_dir, |
17
|
|
|
|
|
|
|
libroot => $lib_dir, |
18
|
|
|
|
|
|
|
desc => $desc || 'Catalyst based application', |
19
|
|
|
|
|
|
|
charset => $charset || 'UTF-8', |
20
|
|
|
|
|
|
|
lang => $lang || 'en', |
21
|
|
|
|
|
|
|
)->gen; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |
25
|
|
|
|
|
|
|
__END__ |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 NAME |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
Catalyst::Helper::Doc - documentation page generator. |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 SYNOPSIS |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
# execute helper script. |
34
|
|
|
|
|
|
|
script/myapp_create.pl Doc |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
# you can set description |
37
|
|
|
|
|
|
|
# default is "Catalyst based application" |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
script/myapp_create.pl Doc "This is description!" |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
# you can set language type used as xml:lang. defualt is "en" |
42
|
|
|
|
|
|
|
script/myapp_create.pl Doc "This is description!" ja |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
# you also can set charset, default is UTF-8 |
45
|
|
|
|
|
|
|
script/myapp_create.pl Doc "This is description!" ja EUC-JP |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 DESCRIPTION |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
This module allows you to parse your libraries POD, and generate documentation like pages in search.cpan.org, |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Execute according to SYNOPSIS, and 'doc' directory will be created, and documentation will be put into it. |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 SEE ALSO |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
L<Pod::ProjectDocs> |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 AUTHOR |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Lyo Kato E<lt>lyo.kato@gmail.comE<gt> |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
Copyright (C) 2005 by Lyo Kato |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
66
|
|
|
|
|
|
|
it under the same terms as Perl itself, either Perl version 5.8.5 or, |
67
|
|
|
|
|
|
|
at your option, any later version of Perl 5 you may have available. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=cut |