lib/Pod/Browser.pm

filter: Statementstmt 94.4% 17 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod n/a totaltotal 91.3% 21 / 23 CC 1 SCAR 0.2
CC
1
Cov
94%
__ANON__
1.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« script/pod_browser_server.pl ↑ Summary lib/Pod/Browser/Controller/Root.pm »
1 #
2 # This file is part of Pod-Browser
3 #
4 # This software is Copyright (c) 2012 by Moritz Onken.
5 #
6 # This is free software, licensed under:
7 #
8 # The (three-clause) BSD License
9 #
10 package Pod::Browser;
11 {
12 2 $Pod::Browser::VERSION = '1.0.1';
13 }
14 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 # ABSTRACT: Pod Web Server based on Catalyst and ExtJS
17 2 ▶use Catalyst::Runtime '5.70';
Subroutine BEGIN: called CC=1 SCAR=0.0
18 2 ▶use base qw/Catalyst/;
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 2 __PACKAGE__->config( name => 'Pod::Browser' );
21 2 __PACKAGE__->setup(qw/ ConfigLoader Static::Simple/);
22  
23 0 ▶sub { __PACKAGE__->run( @_) };
Subroutine __ANON__: not called CC=1 SCAR=1.2
24  
25  
26  
27 =pod
28  
29 =head1 NAME
30  
31 Pod::Browser - Pod Web Server based on Catalyst and ExtJS
32  
33 =head1 VERSION
34  
35 version 1.0.1
36  
37 =head1 SYNOPSIS
38  
39 # pod_browser
40  
41 visit http://localhost:3030
42  
43 =head1 DESCRIPTION
44  
45 This is a L<Catalyst> server which serves PODs. It allows you to browse through your local
46 repository of modules. On the front page is a search box
47 which uses CPAN's xml interface to retrieve the results. If you click on one of them
48 the POD is displayed in this application.
49  
50 Cross links in PODs are resolved and pop up as a new tab. If the module you clicked on is
51 not installed this controller fetches the source code from CPAN and creates the pod locally.
52 There is also a TOC which is always visible and scrolls the current POD to the selected section.
53  
54 It is written using a JavaScript framework called ExtJS (L<http://www.extjs.com>) which
55 generates beautiful and rich user interfaces.
56  
57 =for html <p><center><img src="http://cpan.org/authors/id/P/PE/PERLER/pod-images/pod-encyclopedia-01.png" width="882" height="462" /></center></p>
58  
59 =head1 CONFIGURATION
60  
61 First you have to locate the config file. Try
62  
63 # locate pod_browser.yml
64  
65 in your command line and open it.
66  
67 =over
68  
69 =item inc (Boolean)
70  
71 Search for modules in @INC. Set it to 1 or 0.
72  
73 Defaults to C<0>.
74  
75 =item namespaces (Arrayref)
76  
77 Filter by namespaces. See L<Pod::Simple::Search> C<limit_glob> for syntax.
78  
79 Defaults to C<["*"]>
80  
81 =item self (Boolean)
82  
83 Search for modules in C<< $c->path_to( 'lib' ) >>.
84  
85 Defaults to C<1>.
86  
87 =item dirs (Arrayref)
88  
89 Search for modules in these directories.
90  
91 Defaults to C<[]>.
92  
93 =back
94  
95 =head1 STARTING THE SERVER
96  
97 C<pod_browser> makes use of L<Plack::Runner>. As a result, all options from L<plackup> are
98 also available to C<pod_browser>.
99  
100 Run C<pod_browser --help> or see L<plackup> for more information.
101  
102 =head1 INTEGRATION IN CATALYST
103  
104 If you want to integrate this application directly into your catalyst application have a look at L<Catalyst::Controller::POD>.
105 This controller is used by this application.
106  
107 =head1 SEE ALSO
108  
109 L<Catalyst>, L<Catalyst::Controller::POD>
110  
111 ExtJS (L<http://www.extjs.com>) is used for the user interface.
112  
113 Other Pod Web Servers:
114  
115 L<Pod::Server>, L<Pod::Webserver>, L<Pod::POM::Web>
116  
117 =head1 AUTHOR
118  
119 Moritz Onken <onken@netcubed.de>
120  
121 =head1 COPYRIGHT AND LICENSE
122  
123 This software is Copyright (c) 2012 by Moritz Onken.
124  
125 This is free software, licensed under:
126  
127 The (three-clause) BSD License
128  
129 =cut
130  
131  
132 __END__
« script/pod_browser_server.pl ↑ Summary lib/Pod/Browser/Controller/Root.pm »