Pod-ProjectDocs-0.50000755000765000024 013225152263 14154 5ustar00martinstaff000000000000LICENSE100644000765000024 4374013225152263 15272 0ustar00martinstaff000000000000Pod-ProjectDocs-0.50This software is copyright (c) 2018 by Lyo Kato . This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2018 by Lyo Kato . This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2018 by Lyo Kato . This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End dist.ini100644000765000024 231713225152263 15704 0ustar00martinstaff000000000000Pod-ProjectDocs-0.50name = Pod-ProjectDocs version = 0.50 author = Martin Gruner author = Lyo Kato license = Perl_5 copyright_holder = Lyo Kato [@Filter] -bundle = @Basic -remove = Readme [Prereqs] perl = 5.8.0 Carp = 0 Pod::Simple::XHTML = 3.31 Moose = 0 File::Basename = 0 File::Spec = 0 File::Find = 0 File::Copy = 0 HTML::Entities = 0 MIME::Base64 = 0 Template = 0 Readonly = 0 IO::File = 0 JSON = 2.04 [Prereqs / BuildRequires] File::Path = 0 Test::More = 0 lib = 0 [Prereqs / TestRequires] Test::Pod = 0 [OurPkgVersion] [CheckVersionIncrement] [PerlTidy] [CPANFile] [MetaJSON] [MetaProvides::Package] [@Git] [GitHub::Meta] repo = p5-pod-projectdocs [PodSyntaxTests] ;[PodCoverageTests] [Test::Perl::Critic] critic_config = perlcriticrc [ReadmeAnyFromPod / README.md in build] type = markdown filename = Readme.md location = build phase = build [CopyFilesFromBuild] copy = Readme.md META.yml100644000765000024 351013225152263 15505 0ustar00martinstaff000000000000Pod-ProjectDocs-0.50--- abstract: 'generates CPAN like project documents from pod.' author: - 'Martin Gruner ' - 'Lyo Kato ' build_requires: File::Path: '0' Test::More: '0' Test::Pod: '0' lib: '0' configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 0 generated_by: 'Dist::Zilla version 6.009, CPAN::Meta::Converter version 2.150005' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Pod-ProjectDocs provides: Pod::ProjectDocs: file: lib/Pod/ProjectDocs.pm version: '0.50' Pod::ProjectDocs::CSS: file: lib/Pod/ProjectDocs/CSS.pm version: '0.50' Pod::ProjectDocs::Config: file: lib/Pod/ProjectDocs/Config.pm version: '0.50' Pod::ProjectDocs::Doc: file: lib/Pod/ProjectDocs/Doc.pm version: '0.50' Pod::ProjectDocs::DocManager: file: lib/Pod/ProjectDocs/DocManager.pm version: '0.50' Pod::ProjectDocs::File: file: lib/Pod/ProjectDocs/File.pm version: '0.50' Pod::ProjectDocs::IndexPage: file: lib/Pod/ProjectDocs/IndexPage.pm version: '0.50' Pod::ProjectDocs::Parser: file: lib/Pod/ProjectDocs/Parser.pm version: '0.50' Pod::ProjectDocs::Parser::XHTML: file: lib/Pod/ProjectDocs/Parser/XHTML.pm version: '0.50' Pod::ProjectDocs::Template: file: lib/Pod/ProjectDocs/Template.pm version: '0.50' requires: Carp: '0' File::Basename: '0' File::Copy: '0' File::Find: '0' File::Spec: '0' HTML::Entities: '0' IO::File: '0' JSON: '2.04' MIME::Base64: '0' Moose: '0' Pod::Simple::XHTML: '3.31' Readonly: '0' Template: '0' perl: v5.8.0 resources: bugtracker: https://github.com/mgruner/p5-pod-projectdocs/issues repository: git://github.com/mgruner/p5-pod-projectdocs.git version: '0.50' x_serialization_backend: 'YAML::Tiny version 1.69' MANIFEST100644000765000024 123313225152263 15365 0ustar00martinstaff000000000000Pod-ProjectDocs-0.50# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.009. Changes.md LICENSE MANIFEST META.json META.yml Makefile.PL Readme.md bin/pod2projdocs cpanfile dist.ini lib/Pod/ProjectDocs.pm lib/Pod/ProjectDocs/CSS.pm lib/Pod/ProjectDocs/Config.pm lib/Pod/ProjectDocs/Doc.pm lib/Pod/ProjectDocs/DocManager.pm lib/Pod/ProjectDocs/File.pm lib/Pod/ProjectDocs/IndexPage.pm lib/Pod/ProjectDocs/Parser.pm lib/Pod/ProjectDocs/Parser/XHTML.pm lib/Pod/ProjectDocs/Template.pm perlcriticrc t/00_compile.t t/01_project.t t/02_module.t t/author-critic.t t/author-pod-syntax.t t/sample/lib/Sample/Module.pm t/sample/lib/Sample/Project.pm t/sample/lib2/Module.pm cpanfile100644000765000024 131413225152263 15740 0ustar00martinstaff000000000000Pod-ProjectDocs-0.50requires "Carp" => "0"; requires "File::Basename" => "0"; requires "File::Copy" => "0"; requires "File::Find" => "0"; requires "File::Spec" => "0"; requires "HTML::Entities" => "0"; requires "IO::File" => "0"; requires "JSON" => "2.04"; requires "MIME::Base64" => "0"; requires "Moose" => "0"; requires "Pod::Simple::XHTML" => "3.31"; requires "Readonly" => "0"; requires "Template" => "0"; requires "perl" => "v5.8.0"; on 'build' => sub { requires "File::Path" => "0"; requires "Test::More" => "0"; requires "lib" => "0"; }; on 'test' => sub { requires "Test::Pod" => "0"; }; on 'configure' => sub { requires "ExtUtils::MakeMaker" => "0"; }; on 'develop' => sub { requires "Test::Pod" => "1.41"; }; Readme.md100644000765000024 502513225152263 15756 0ustar00martinstaff000000000000Pod-ProjectDocs-0.50# NAME Pod::ProjectDocs - generates CPAN like project documents from pod. # SYNOPSIS #!/usr/bin/perl use strict; use warnings; use Pod::ProjectDocs; my $pd = Pod::ProjectDocs->new( libroot => '/your/project/lib/root', outroot => '/output/directory', title => 'ProjectName', ); $pd->gen(); # or use pod2projdocs on your shell pod2projdocs -out /output/directory -lib /your/project/lib/root # DESCRIPTION This module allows you to generates CPAN like pod pages from your modules for your projects. It also creates an optional index page. # OPTIONS - `outroot` output directory for the generated documentation. - `libroot` your library's (source code) root directory. You can set single path by string, or multiple by arrayref. my $pd = Pod::ProjectDocs->new( outroot => '/path/to/output/directory', libroot => '/path/to/lib' ); or my $pd = Pod::ProjectDocs->new( outroot => '/path/to/output/directory', libroot => ['/path/to/lib1', '/path/to/lib2'], ); - `title` your project's name. - `desc` description for your project. - `index` whether you want to create an index for all generated pages (0 or 1). - `lang` set this language as xml:lang (default 'en') - `forcegen` whether you want to generate HTML document even if source files are not updated (default is 0). - `nosourcecode` whether to suppress inclusion of the original source code in the generated output (default is 0). - `except` the files matches this regex won't be parsed. Pod::ProjectDocs->new( except => qr/^specific_dir\//, ...other parameters ); Pod::ProjectDocs->new( except => [qr/^specific_dir1\//, qr/^specific_dir2\//], ...other parameters ); # pod2projdocs You can use the command line script [pod2projdocs](https://metacpan.org/pod/pod2projdocs) to generate your documentation without creating a custom perl script. pod2projdocs -help # SEE ALSO [Pod::Simple::XHTML](https://metacpan.org/pod/Pod::Simple::XHTML) # AUTHORS - Lyo Kato - [Martin Gruner](https://github.com/mgruner) (current maintainer) # COPYRIGHT AND LICENSE - © 2005 by Lyo Kato - © 2018 by Martin Gruner This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available. META.json100644000765000024 612113225152263 15656 0ustar00martinstaff000000000000Pod-ProjectDocs-0.50{ "abstract" : "generates CPAN like project documents from pod.", "author" : [ "Martin Gruner ", "Lyo Kato " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 6.009, CPAN::Meta::Converter version 2.150005", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Pod-ProjectDocs", "prereqs" : { "build" : { "requires" : { "File::Path" : "0", "Test::More" : "0", "lib" : "0" } }, "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "develop" : { "requires" : { "Test::Pod" : "1.41" } }, "runtime" : { "requires" : { "Carp" : "0", "File::Basename" : "0", "File::Copy" : "0", "File::Find" : "0", "File::Spec" : "0", "HTML::Entities" : "0", "IO::File" : "0", "JSON" : "2.04", "MIME::Base64" : "0", "Moose" : "0", "Pod::Simple::XHTML" : "3.31", "Readonly" : "0", "Template" : "0", "perl" : "v5.8.0" } }, "test" : { "requires" : { "Test::Pod" : "0" } } }, "provides" : { "Pod::ProjectDocs" : { "file" : "lib/Pod/ProjectDocs.pm", "version" : "0.50" }, "Pod::ProjectDocs::CSS" : { "file" : "lib/Pod/ProjectDocs/CSS.pm", "version" : "0.50" }, "Pod::ProjectDocs::Config" : { "file" : "lib/Pod/ProjectDocs/Config.pm", "version" : "0.50" }, "Pod::ProjectDocs::Doc" : { "file" : "lib/Pod/ProjectDocs/Doc.pm", "version" : "0.50" }, "Pod::ProjectDocs::DocManager" : { "file" : "lib/Pod/ProjectDocs/DocManager.pm", "version" : "0.50" }, "Pod::ProjectDocs::File" : { "file" : "lib/Pod/ProjectDocs/File.pm", "version" : "0.50" }, "Pod::ProjectDocs::IndexPage" : { "file" : "lib/Pod/ProjectDocs/IndexPage.pm", "version" : "0.50" }, "Pod::ProjectDocs::Parser" : { "file" : "lib/Pod/ProjectDocs/Parser.pm", "version" : "0.50" }, "Pod::ProjectDocs::Parser::XHTML" : { "file" : "lib/Pod/ProjectDocs/Parser/XHTML.pm", "version" : "0.50" }, "Pod::ProjectDocs::Template" : { "file" : "lib/Pod/ProjectDocs/Template.pm", "version" : "0.50" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/mgruner/p5-pod-projectdocs/issues" }, "repository" : { "type" : "git", "url" : "git://github.com/mgruner/p5-pod-projectdocs.git", "web" : "https://github.com/mgruner/p5-pod-projectdocs" } }, "version" : "0.50", "x_serialization_backend" : "JSON::XS version 3.01" } Changes.md100644000765000024 1312413225152263 16150 0ustar00martinstaff000000000000Pod-ProjectDocs-0.50## 0.50 2018-01-09 - Added `-nosourcecode` option to suppress inclusion of the original sources. ## 0.49 2017-09-20 - Switch to metacpan for external perldoc links. - Ported to Moose. ## 0.48 2017-04-25 - Rewrite of the Parser to use Pod::Simple::XHTML internally instead of legacy Pod::Parser. This fixes some issues with linking and adds proper encoding support based on the Pod command `=encoding`. - Therefore the `-charset` parameter was removed. Pod sources are correctly processed as described by the specification, all output files are generated as UTF-8. - Support for function source code embedding was removed in order to focus on proper Pod rendering instead. - Fixed support for Perl 5.8 and 5.10 that was missing in 0.45. ## 0.45 2016-11-17 - Fixed: 0.44 removes empty lines in verbatim sections (#1). ## 0.44 2016-11-12 - Removed support for JavaScript Pod. www.openjsan.org is dead since 2011 and JavaScript has its own specialized documentation format, JSDOC. - Use '::' as path separator for Perl Modules and '/' otherwise, instead of '-' (github issue#1). ## 0.43 2016-11-08 - Properly handle UTF-8 input files by applying the -charset param also when parsing source files. - Fixed handling of character escape sequences (RT#25123). - Removed support for broken distribution Syntax::Highlight::Universal. - Improved POD wording for this distribution. ;) ## 0.42 2016-11-07 - Fixed race condition on parallel test execution (RT#105374). - Fixed method source code being shown in wrong modules (RT#69545). - Improved verbatim block output to not add tralining lines (RT#15052). - Fixed: don't use replace markers that might conflict with other software such as Perl::Critic (RT#35478). ## 0.41 2016-11-07 - Fixed JSON output to generate stable structures that can be added to version control systems without changing all the time. - Generate Perl package documentation with proper :: separators in package name. - Ignore files which don't contain POD. - Correctly skip content in data sections (between =begin and =end). ## 0.40 Tue Oct 26 02:54:00 2010 - removed auto_install from Makefile.PM. Thanks to tokuhirom. https://github.com/lyokato/p5-pod-projectdocs/pull/2 ## 0.39 Tue Oct 26 02:54:00 2010 - updated for windows compatibility. Thanks to wchristian http://github.com/lyokato/p5-pod-projectdocs/pull/1 ## 0.38 Thr Mar 11 01:20:00 2010 - fixed pod2projdocs typo Thanks to Tokuhiro Matsuno and Naoki Tomita ## 0.36 Wed May 14 10:20:00 2008 - $json->objToJson => $json->encode objToJson prints deprecated warnings. Thanks to tokuhirom. ## 0.35 Fri Jan 18 18:10:00 2008 - removed $json->autoconv(0) because JSON doesn't have autoconv method from version 2. RT#32408, 32409 ## 0.34 Sat Oct 27 21:56:00 2007 - Fixed pod2projdocs bug. Added METHOD_REGEXP, now you can control pattern that the parser consider as method. Thanks to Ktat. ## 0.33 Mon Oct 15 01:55:00 2007 - Fixed document of pod2projdocs - added description for forcegen option. Now it shows it's usage when excused without any option. Applyed a patch that makes JSON's autoconvert functionality off. Thanks to Ktat. ## 0.31 Mon Jan 29 12:00:00 2007 - Changed to use Module::Install for instllation, and made dependency on Syntax::Highlight::Universal optional. ## 0.30 Tue Jan 09 12:00:00 2007 - applyed a great patch from Ankur Gupta. Now you can see syntax highlighten source code below the document for each methods. When the parser finds format like "=head2 method_name", it appends source code block on HTML. Click the anchor "[Source]", and it toggles the source code block. ## 0.26 Tue Jul 11 02:00:00 2006 - added 'except' parameter, Thanks to Nadim. ## 0.22 Tue Dec 11 02:00:00 2005 - now generated files are strict xhtml. ## 0.21 Tue Sep 27 13:00:00 2005 - added function highlighting matched word ## 0.20 Tue Sep 27 12:00:00 2005 - fixed test script ## 0.19 Tue Sep 27 02:00:00 2005 - fixed some bug - added search box to index page reported by Nadim ## 0.18 Tue Sep 13 22:33:00 2005 - fixed _htmlEscape in parser to prevent to put out not intended results with double html-escaping reported by Tatsuhiko Miyagawa ## 0.17 Sun Sep 4 00:07:00 2005 ^ - fixed MANIFEST ## 0.16 Sun Sep 4 00:07:00 2005 - fixed Makefile.PL ## 0.15 Sat Sep 3 22:04:00 2005 - added option 'forcegen' - fixed parser, now it creates link for L properly. patched by Tatsuhiko Miyagawa. ## 0.14 Sat Sep 3 11:56:00 2005 - fixed mismapping in Pod::ProjectDocs::Parser found by Tatsuhiko Miyagawa. ## 0.13 Sat Aug 27 14:00:00 2005 - fixed Makefile.PL, to remove bug appears in old version of Pod::Parser. Reported by Tatsuhiko Miyagawa. ## 0.12 Fri Aug 26 23:00:00 2005 - add footer ## 0.11 Fri Aug 26 22:00:00 2005 - fixed bug in DocManager ## 0.1 Fri Aug 26 02:00:00 2005 - fixed bug that doesn't create 'src' directory. - fixed parser html-building-process little bit. - fixed bug by typo in DocManager - add manager for trigger-scripts ('.cgi', '.pl' files) ## 0.09 Sat Aug 20 02:00:00 2005 - fixed problem about namespace confliction between '.pm' and '.js'. ## 0.08 Fri Aug 19 12:00:00 2005 - fixed not to use Pod::Xhtml. - add manager for javascript libraries. ## 0.07 Thu Aug 18 23:00:00 2005 - add link to source file. - fixed to check last modified time. ## 0.06 Thu Aug 18 18:00:00 2005 - fixed to handle multiple 'libroot' by patch from Tatsuhiko Miyagawa. ## 0.05 Fri Jun 24 18:00:00 2005 - fixed bug. now you can set relative path for -lib and -out options. ## 0.02 Sat Jun 18 18:00:00 2005 - CPAN release version; ## 0.01 Thu Jun 16 16:52:20 2005 - original version; created by h2xs 1.23 with options -X -A Pod::ProjectDocs Makefile.PL100644000765000024 344313225152263 16213 0ustar00martinstaff000000000000Pod-ProjectDocs-0.50# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.009. use strict; use warnings; use 5.008000; use ExtUtils::MakeMaker; my %WriteMakefileArgs = ( "ABSTRACT" => "generates CPAN like project documents from pod.", "AUTHOR" => "Martin Gruner , Lyo Kato ", "BUILD_REQUIRES" => { "File::Path" => 0, "Test::More" => 0, "lib" => 0 }, "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => 0 }, "DISTNAME" => "Pod-ProjectDocs", "EXE_FILES" => [ "bin/pod2projdocs" ], "LICENSE" => "perl", "MIN_PERL_VERSION" => "5.008000", "NAME" => "Pod::ProjectDocs", "PREREQ_PM" => { "Carp" => 0, "File::Basename" => 0, "File::Copy" => 0, "File::Find" => 0, "File::Spec" => 0, "HTML::Entities" => 0, "IO::File" => 0, "JSON" => "2.04", "MIME::Base64" => 0, "Moose" => 0, "Pod::Simple::XHTML" => "3.31", "Readonly" => 0, "Template" => 0 }, "TEST_REQUIRES" => { "Test::Pod" => 0 }, "VERSION" => "0.50", "test" => { "TESTS" => "t/*.t" } ); my %FallbackPrereqs = ( "Carp" => 0, "File::Basename" => 0, "File::Copy" => 0, "File::Find" => 0, "File::Path" => 0, "File::Spec" => 0, "HTML::Entities" => 0, "IO::File" => 0, "JSON" => "2.04", "MIME::Base64" => 0, "Moose" => 0, "Pod::Simple::XHTML" => "3.31", "Readonly" => 0, "Template" => 0, "Test::More" => 0, "Test::Pod" => 0, "lib" => 0 ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { delete $WriteMakefileArgs{TEST_REQUIRES}; delete $WriteMakefileArgs{BUILD_REQUIRES}; $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); perlcriticrc100644000765000024 20513225152263 16622 0ustar00martinstaff000000000000Pod-ProjectDocs-0.50severity = 4 verbose = %m at %f line %l [%p]\n [TestingAndDebugging::RequireUseStrict] [Variables::ProhibitConditionalDeclarations] t000755000765000024 013225152263 14340 5ustar00martinstaff000000000000Pod-ProjectDocs-0.5002_module.t100644000765000024 203413225152263 16452 0ustar00martinstaff000000000000Pod-ProjectDocs-0.50/t#!/usr/bin/env perl use strict; use warnings; use utf8; use FindBin; use Test::More tests => 9; use File::Path qw( remove_tree ); use lib '../lib'; use Pod::ProjectDocs; Pod::ProjectDocs->new( outroot => "$FindBin::Bin/02_module_output", libroot => "$FindBin::Bin/sample/lib2", forcegen => 1, nosourcecode => 1, )->gen(); # using XML::XPath might be better open my $fh, "<:encoding(utf-8)", "$FindBin::Bin/02_module_output/Module.pm.html"; my $html = join '', <$fh>; close $fh; like $html, qr!foo foo foo!; like $html, qr!bar bar bar!; like $html, qr!>\$foo = foo\(\@_\)barSource"\$content = get\( ... \)"!; like $html, qr!get function does foo!; remove_tree("$FindBin::Bin/02_module_output"); 01_project.t100644000765000024 242713225152263 16640 0ustar00martinstaff000000000000Pod-ProjectDocs-0.50/t#!/usr/bin/env perl use strict; use warnings; use utf8; use FindBin; use Test::More tests => 11; use File::Path qw( remove_tree ); use lib '../lib'; use Pod::ProjectDocs; Pod::ProjectDocs->new( outroot => "$FindBin::Bin/01_project_output", libroot => "$FindBin::Bin/sample/lib", forcegen => 1, )->gen(); # using XML::XPath might be better open my $fh, "<:encoding(UTF-8)", "$FindBin::Bin/01_project_output/Sample/Project.pm.html"; my $html = join '', <$fh>; close $fh; like $html, qr!See "SYNOPSIS" for its usage!; like $html, qr!http://www.perl.org/!; like $html, qr!Perl POD Syntax!; like $html, qr!href="../podstyle.css"!; like $html, qr!href="../index.html"!; like $html, qr!href="../src/Sample/Project.pm"!; like $html, qr!mäh!; open my $i_fh, "<:encoding(UTF-8)", "$FindBin::Bin/01_project_output/index.html"; my $index_html = join '', <$i_fh>; close $i_fh; like $index_html, qr!Sample/Module.pm.html!; like $index_html, qr!Sample/Project.pm.html!; # Source code is generated ok( -f "$FindBin::Bin/01_project_output/src/Sample/Project.pm" ); # Source code link is present like $html, qr!>Source 1; require_ok "Pod::ProjectDocs"; bin000755000765000024 013225152263 14645 5ustar00martinstaff000000000000Pod-ProjectDocs-0.50pod2projdocs100755000765000024 435213225152263 17347 0ustar00martinstaff000000000000Pod-ProjectDocs-0.50/bin#!/usr/bin/perl -w use strict; use warnings; our $VERSION = '0.50'; # VERSION use Getopt::Long; use Pod::Usage; use Pod::ProjectDocs; my ( $out, $lib, $title, $lang, $desc, $index, $verbose, $forcegen, $nosourcecode, $except ); my $help = @ARGV == 0; my %opt = ( 'help|?' => \$help, 'out|o=s' => \$out, 'lib|l=s@' => \$lib, 'except|e=s@' => \$except, 'title|t=s' => \$title, 'desc|d=s' => \$desc, 'index!' => \$index, 'verbose|v' => \$verbose, 'forcegen!' => \$forcegen, 'nosourcecode!' => \$nosourcecode, 'lang=s' => \$lang, ); GetOptions(%opt); pod2usage(1) if $help; my $p = Pod::ProjectDocs->new( outroot => $out, libroot => $lib, except => $except, title => $title, desc => $desc, index => $index, verbose => $verbose, forcegen => $forcegen, nosourcecode => $nosourcecode, lang => $lang, ); $p->gen(); =head1 NAME pod2projdocs - generates CPAN like project documents from pod. =head1 SYNOPSIS pod2projdocs [options] Options: -help display this help and exist -out directory path that you want to generate documents into -lib your project's library-root-directory path -title your project's title -desc your project's description -noindex don't create index for all generated pages -forcegen generate documents each time, ignoring last modified timestamp -lang set this language as xml:lang (default 'en') -except the files matches this regex won't be parsed You can set each option with their first character, for example, you can write -o instead of -out. And you can generate documents from multiple library directories. pod2projdocs -o /path/to/outputdir -l /path/to/lib1 -l /path/to/lib2 =head1 DESCRIPTION generates CPAN like project documents from pod. =head1 SEE ALSO L =head1 AUTHOR Lyo Kato Elyo.kato@gmail.comE =head1 COPYRIGHT AND LICENSE Copyright 2005 Lyo Kato. All rights reserved. This library is free software. You can redistribute it and/or modify it under the same terms as perl itself. =cut author-critic.t100644000765000024 65313225152263 17426 0ustar00martinstaff000000000000Pod-ProjectDocs-0.50/t#!perl BEGIN { unless ( $ENV{AUTHOR_TESTING} ) { print qq{1..0 # SKIP these tests are for testing by the author\n}; exit; } } use strict; use warnings; use Test::More; use English qw(-no_match_vars); eval "use Test::Perl::Critic"; plan skip_all => 'Test::Perl::Critic required to criticise code' if $@; Test::Perl::Critic->import( -profile => "perlcriticrc" ) if -e "perlcriticrc"; all_critic_ok(); author-pod-syntax.t100644000765000024 47313225152263 20257 0ustar00martinstaff000000000000Pod-ProjectDocs-0.50/t#!perl BEGIN { unless ( $ENV{AUTHOR_TESTING} ) { print qq{1..0 # SKIP these tests are for testing by the author\n}; exit; } } # This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. use strict; use warnings; use Test::More; use Test::Pod 1.41; all_pod_files_ok(); Pod000755000765000024 013225152263 15365 5ustar00martinstaff000000000000Pod-ProjectDocs-0.50/libProjectDocs.pm100644000765000024 1600413225152263 20323 0ustar00martinstaff000000000000Pod-ProjectDocs-0.50/lib/Podpackage Pod::ProjectDocs; use strict; use warnings; our $VERSION = '0.50'; # VERSION use Moose; use File::Spec; use JSON; use Pod::ProjectDocs::DocManager; use Pod::ProjectDocs::Config; use Pod::ProjectDocs::Parser; use Pod::ProjectDocs::CSS; use Pod::ProjectDocs::IndexPage; has 'managers' => ( is => 'rw', isa => 'ArrayRef', default => sub { [] }, ); has 'components' => ( is => 'rw', isa => 'HashRef', default => sub { {} }, ); has 'config' => ( is => 'ro', isa => 'Object', ); sub BUILDARGS { my ( $class, %args ) = @_; $args{title} ||= "MyProject's Libraries"; $args{desc} ||= "manuals and libraries"; $args{lang} ||= "en"; # set absolute path to 'outroot' $args{outroot} ||= File::Spec->curdir; $args{outroot} = File::Spec->rel2abs( $args{outroot}, File::Spec->curdir ) unless File::Spec->file_name_is_absolute( $args{outroot} ); # set absolute path to 'libroot' $args{libroot} ||= File::Spec->curdir; $args{libroot} = [ $args{libroot} ] unless ref $args{libroot}; $args{libroot} = [ map { File::Spec->file_name_is_absolute($_) ? $_ : File::Spec->rel2abs( $_, File::Spec->curdir ) } @{ $args{libroot} } ]; # check mtime by default, but can be overridden $args{forcegen} ||= 0; $args{nosourcecode} = 0 if !defined $args{nosourcecode}; $args{except} ||= []; $args{except} = [ $args{except} ] unless ref $args{except}; $args{config} = Pod::ProjectDocs::Config->new(%args); return \%args; } sub BUILD { my $self = shift; $self->components->{css} = Pod::ProjectDocs::CSS->new( config => $self->config ); $self->add_manager( 'Perl Manuals', 'pod', Pod::ProjectDocs::Parser->new ); $self->add_manager( 'Perl Modules', 'pm', Pod::ProjectDocs::Parser->new ); $self->add_manager( 'Trigger Scripts', [ 'cgi', 'pl' ], Pod::ProjectDocs::Parser->new ); return; } sub add_manager { my ( $self, $desc, $suffix, $parser ) = @_; push @{ $self->managers }, Pod::ProjectDocs::DocManager->new( config => $self->config, desc => $desc, suffix => $suffix, parser => $parser, ); return; } sub gen { my $self = shift; foreach my $comp_key ( keys %{ $self->components } ) { my $comp = $self->components->{$comp_key}; $comp->publish(); } my %local_modules; foreach my $manager ( @{ $self->managers } ) { next if $manager->desc !~ /Perl Modules/; for my $doc ( @{ $manager->docs() || [] } ) { my $name = $doc->name; my $path = $doc->get_output_path; if ( $manager->desc eq 'Perl Modules' ) { $local_modules{$name} = $path; } } } foreach my $manager ( @{ $self->managers } ) { $manager->parser->local_modules( \%local_modules ); for my $doc ( @{ $manager->docs() || [] } ) { my $html = $manager->parser->gen_html( doc => $doc, desc => $manager->desc, components => $self->components, ); if ( $self->config->forcegen || $doc->is_modified ) { if ( !$self->config->nosourcecode ) { $doc->copy_src(); } $doc->publish($html); } } } my $index_page = Pod::ProjectDocs::IndexPage->new( config => $self->config, components => $self->components, json => $self->get_managers_json, ); $index_page->publish(); return; } sub get_managers_json { my $self = shift; my $js = JSON->new; my $records = []; foreach my $manager ( @{ $self->managers } ) { my $record = { desc => $manager->desc, records => [], }; foreach my $doc ( @{ $manager->docs } ) { push @{ $record->{records} }, { path => $doc->relpath, name => $doc->name, title => $doc->title, }; } if ( scalar( @{ $record->{records} } ) > 0 ) { push @$records, $record; } } # Use "canonical" to generate stable structures that can be added # to version control systems without changing all the time. return $js->canonical()->encode($records); } sub _croak { my ( $self, $msg ) = @_; require Carp; Carp::croak($msg); return; } 1; __END__ =encoding utf-8 =head1 NAME Pod::ProjectDocs - generates CPAN like project documents from pod. =head1 SYNOPSIS #!/usr/bin/perl use strict; use warnings; use Pod::ProjectDocs; my $pd = Pod::ProjectDocs->new( libroot => '/your/project/lib/root', outroot => '/output/directory', title => 'ProjectName', ); $pd->gen(); # or use pod2projdocs on your shell pod2projdocs -out /output/directory -lib /your/project/lib/root =head1 DESCRIPTION This module allows you to generates CPAN like pod pages from your modules for your projects. It also creates an optional index page. =head1 OPTIONS =over 4 =item C output directory for the generated documentation. =item C your library's (source code) root directory. You can set single path by string, or multiple by arrayref. my $pd = Pod::ProjectDocs->new( outroot => '/path/to/output/directory', libroot => '/path/to/lib' ); or my $pd = Pod::ProjectDocs->new( outroot => '/path/to/output/directory', libroot => ['/path/to/lib1', '/path/to/lib2'], ); =item C your project's name. =item C<desc> description for your project. =item C<index> whether you want to create an index for all generated pages (0 or 1). =item C<lang> set this language as xml:lang (default 'en') =item C<forcegen> whether you want to generate HTML document even if source files are not updated (default is 0). =item C<nosourcecode> whether to suppress inclusion of the original source code in the generated output (default is 0). =item C<except> the files matches this regex won't be parsed. Pod::ProjectDocs->new( except => qr/^specific_dir\//, ...other parameters ); Pod::ProjectDocs->new( except => [qr/^specific_dir1\//, qr/^specific_dir2\//], ...other parameters ); =back =head1 pod2projdocs You can use the command line script L<pod2projdocs> to generate your documentation without creating a custom perl script. pod2projdocs -help =head1 SEE ALSO L<Pod::Simple::XHTML> =head1 AUTHORS =over 4 =item Lyo Kato E<lt>lyo.kato@gmail.comE<gt> =item L<Martin Gruner|https://github.com/mgruner> (current maintainer) =back =head1 COPYRIGHT AND LICENSE =over 4 =item © 2005 by Lyo Kato =item © 2018 by Martin Gruner =back This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available. =cut ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������lib2������������������������������������������������������������������������������������������������000755��000765��000024�� 0�13225152263� 16451� 5����������������������������������������������������������������������������������������������������ustar�00martin��������������������������staff���������������������������000000��000000��Pod-ProjectDocs-0.50/t/sample������������������������������������������������������������������������������������������������������������������������������������������Module.pm�������������������������������������������������������������������������������������������100644��000765��000024�� 677�13225152263� 20366� 0����������������������������������������������������������������������������������������������������ustar�00martin��������������������������staff���������������������������000000��000000��Pod-ProjectDocs-0.50/t/sample/lib2�������������������������������������������������������������������������������������������������������������������������������������package Module; use strict; use warnings; sub foo { # foo foo foo } sub bar { # bar bar bar } 1; __END__ =head1 NAME Module - Sample Module =head1 SYNOPSIS blah blah blah =head1 MODULES =head2 $foo = foo(@_) foo foo foo =head2 bar bar bar bar =head1 CHARACTER ESCAPES E<lt> E<gt> E<verbar> E<sol> E<eacute> E<0x201E> E<075> E<181> =head1 "$content = get( ... )" The L<get|/"$content = get( ... )"> function does foo. �����������������������������������������������������������������ProjectDocs�����������������������������������������������������������������������������������������000755��000765��000024�� 0�13225152263� 17604� 5����������������������������������������������������������������������������������������������������ustar�00martin��������������������������staff���������������������������000000��000000��Pod-ProjectDocs-0.50/lib/Pod�������������������������������������������������������������������������������������������������������������������������������������������CSS.pm����������������������������������������������������������������������������������������������100644��000765��000024�� 12200�13225152263� 20745� 0����������������������������������������������������������������������������������������������������ustar�00martin��������������������������staff���������������������������000000��000000��Pod-ProjectDocs-0.50/lib/Pod/ProjectDocs�������������������������������������������������������������������������������������������������������������������������������package Pod::ProjectDocs::CSS; use strict; use warnings; our $VERSION = '0.50'; # VERSION use Moose; with 'Pod::ProjectDocs::File'; use File::Basename; has 'default_name' => ( is => 'ro', isa => 'Str', default => 'podstyle.css', ); has 'data' => ( is => 'ro', default => <<'DATA', BODY, .logo { background: white; } BODY { color: black; font-family: arial,sans-serif; margin: 0; padding: 1ex; } TABLE { border-collapse: collapse; border-spacing: 0; border-width: 0; color: inherit; } IMG { border: 0; } FORM { margin: 0; } input { margin: 2px; } .logo { float: left; width: 264px; height: 77px; } .front .logo { float: none; display:block; } .front .searchbox { margin: 2ex auto; text-align: center; } .front .menubar { text-align: center; } .menubar { background: #006699; margin: 1ex 0; padding: 1px; } .menubar A { padding: 0.8ex; font: bold 10pt Arial,Helvetica,sans-serif; } .menubar A:link, .menubar A:visited { color: white; text-decoration: none; } .menubar A:hover { color: #ff6600; text-decoration: underline; } A:link, A:visited { background: transparent; color: #006699; } A[href="#POD_ERRORS"] { background: transparent; color: #FF0000; } TD { margin: 0; padding: 0; } DIV { border-width: 0; } DT { margin-top: 1em; } .credits TD { padding: 0.5ex 2ex; } .huge { font-size: 32pt; } .s { background: #dddddd; color: inherit; } .s TD, .r TD { padding: 0.2ex 1ex; vertical-align: baseline; } TH { background: #bbbbbb; color: inherit; padding: 0.4ex 1ex; text-align: left; } TH A:link, TH A:visited { background: transparent; color: black; } .box { border: 1px solid #006699; margin: 1ex 0; padding: 0; } .distfiles TD { padding: 0 2ex 0 0; vertical-align: baseline; } .manifest TD { padding: 0 1ex; vertical-align: top; } .l1 { font-weight: bold; } .l2 { font-weight: normal; } .t1, .t2, .t3, .t4 { background: #006699; color: white; } .t4 { padding: 0.2ex 0.4ex; } .t1, .t2, .t3 { padding: 0.5ex 1ex; } /* IE does not support .box>.t1 Grrr */ .box .t1, .box .t2, .box .t3 { margin: 0; } .t1 { font-size: 1.4em; font-weight: bold; text-align: center; } .t2 { font-size: 1.0em; font-weight: bold; text-align: left; } .t3 { font-size: 1.0em; font-weight: normal; text-align: left; } /* width: 100%; border: 0.1px solid #FFFFFF; */ /* NN4 hack */ .datecell { text-align: center; width: 17em; } .cell { padding: 0.2ex 1ex; text-align: left; } .label { background: #aaaaaa; color: black; font-weight: bold; padding: 0.2ex 1ex; text-align: right; white-space: nowrap; vertical-align: baseline; } .categories { border-bottom: 3px double #006699; margin-bottom: 1ex; padding-bottom: 1ex; } .categories TABLE { margin: auto; } .categories TD { padding: 0.5ex 1ex; vertical-align: baseline; } .path A { background: transparent; color: #006699; font-weight: bold; } .pages { background: #dddddd; color: #006699; padding: 0.2ex 0.4ex; } .path { background: #dddddd; border-bottom: 1px solid #006699; color: #006699; /* font-size: 1.4em;*/ margin: 1ex 0; padding: 0.5ex 1ex; } .menubar TD { background: #006699; color: white; } .menubar { background: #006699; color: white; margin: 1ex 0; padding: 1px; } .menubar .links { background: transparent; color: white; padding: 0.2ex; text-align: left; } .menubar .searchbar { background: black; color: black; margin: 0px; padding: 2px; text-align: right; } A.m:link, A.m:visited { background: #006699; color: white; font: bold 10pt Arial,Helvetica,sans-serif; text-decoration: none; } A.o:link, A.o:visited { background: #006699; color: #ccffcc; font: bold 10pt Arial,Helvetica,sans-serif; text-decoration: none; } A.o:hover { background: transparent; color: #ff6600; text-decoration: underline; } A.m:hover { background: transparent; color: #ff6600; text-decoration: underline; } table.dlsip { background: #dddddd; border: 0.4ex solid #dddddd; } .pod PRE { background: #eeeeee; border: 1px solid #888888; color: black; padding: 1em; white-space: pre; } .pod H1 { background: transparent; color: #006699; font-size: large; } .pod H2 { background: transparent; color: #006699; font-size: medium; } .pod IMG { vertical-align: top; } .pod .toc A { text-decoration: none; } .pod .toc LI { line-height: 1.2em; list-style-type: none; } .column { padding: 0.5ex 1ex; vertical-align: top; } .datebar { margin: auto; width: 14em; } .date { background: transparent; color: #008000; } .footer { margin-top: 1ex; text-align: right; color: #006699; font-size: x-small; border-top: 1px solid #006699; line-height: 120%; } .front .footer { border-top: none; } .search_highlight { color: #ff6600; } DATA ); sub relative_url { my ( $self, $doc ) = @_; my ( $name, $path ) = fileparse $doc->get_output_path, qw/\.html/; my $relpath = File::Spec->abs2rel( $self->get_output_path, $path ); $relpath =~ s:\\:/:g if $^O eq 'MSWin32'; return $relpath; } 1; ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Doc.pm����������������������������������������������������������������������������������������������100644��000765��000024�� 5640�13225152263� 21014� 0����������������������������������������������������������������������������������������������������ustar�00martin��������������������������staff���������������������������000000��000000��Pod-ProjectDocs-0.50/lib/Pod/ProjectDocs�������������������������������������������������������������������������������������������������������������������������������package Pod::ProjectDocs::Doc; use strict; use warnings; our $VERSION = '0.50'; # VERSION use Moose; with 'Pod::ProjectDocs::File'; use File::Basename; use File::Spec; use File::Copy; use Carp(); has 'origin' => ( is => 'rw', isa => 'Str', ); has 'suffix' => ( is => 'rw', isa => 'Str', ); has 'origin_root' => ( is => 'rw', isa => 'Str', ); has 'title' => ( is => 'rw', isa => 'Str', ); has 'data' => ( is => 'ro', default => <<'DATA', <div class="box"> <h1 class="t1">[% title | html %]</h1> <table> <tr> <td class="label">Description</td> <td class="cell">[% desc | html | html_line_break %]</td> </tr> </table> </div> <div class="path"> <a href="[% outroot _ '/index.html' | relpath %]">[% title | html %]</a> > [% mgr_desc | html %] > [% name | html %] </div> <div> [% IF !nosourcecode %] <a href="[% src | relpath %]">Source</a> [% END %] </div> DATA ); sub BUILD { my $self = shift; # This must be done after the other data is available. $self->_set_relpath; return; } sub _set_relpath { my $self = shift; my $suffix = $self->suffix; my ( $name, $dir ) = fileparse $self->origin, qr/\.$suffix/; my $reldir = File::Spec->abs2rel( $dir, $self->origin_root ); $reldir ||= File::Spec->curdir; my $outroot = $self->config->outroot; $self->_check_dir( $reldir, $outroot ); $self->_check_dir( $reldir, File::Spec->catdir( $outroot, "src" ) ); my $relpath = File::Spec->catdir( $reldir, $name ); $relpath =~ s:\\:/:g if $^O eq 'MSWin32'; if ( lc $suffix eq 'pm' ) { $self->name( join "::", File::Spec->splitdir($relpath) ); } else { $self->name( join "/", File::Spec->splitdir($relpath) ); } $self->relpath( $relpath . "." . $suffix . ".html" ); return; } sub _check_dir { my ( $self, $dir, $path ) = @_; $self->_mkdir($path); my @dirs = File::Spec->splitdir($dir); foreach my $dir (@dirs) { $path = File::Spec->catdir( $path, $dir ); $self->_mkdir($path); } return; } sub _mkdir { my ( $self, $path ) = @_; unless ( -e $path && -d _ ) { mkdir( $path, 0755 ) or Carp::croak(qq/Can't make directory [$path]./); } return; } sub get_output_src_path { my $self = shift; my $outroot = File::Spec->catdir( $self->config->outroot, "src" ); my $relpath = $self->relpath; my $suffix = $self->suffix; $relpath =~ s/\.html$//; my $path = File::Spec->catfile( $outroot, $relpath ); return $path; } sub copy_src { my $self = shift; my $origin = $self->origin; my $newsrc = $self->get_output_src_path; File::Copy::copy( $origin, $newsrc ); return; } sub is_modified { my $self = shift; my $origin = $self->origin; my $newsrc = $self->get_output_src_path; return 1 unless ( -e $newsrc ); return ( -M $origin < -M $newsrc ) ? 1 : 0; } 1; ������������������������������������������������������������������������������������������������File.pm���������������������������������������������������������������������������������������������100644��000765��000024�� 2173�13225152263� 21164� 0����������������������������������������������������������������������������������������������������ustar�00martin��������������������������staff���������������������������000000��000000��Pod-ProjectDocs-0.50/lib/Pod/ProjectDocs�������������������������������������������������������������������������������������������������������������������������������package Pod::ProjectDocs::File; use strict; use warnings; our $VERSION = '0.50'; # VERSION use Moose::Role; use IO::File; use Carp(); has 'data' => ( is => 'ro', ); has 'default_name' => ( is => 'ro', isa => 'Str', ); has 'is_bin' => ( is => 'rw', default => 0, ); has 'config' => ( is => 'ro', ); has 'name' => ( is => 'rw', isa => 'Str', ); has 'relpath' => ( is => 'rw', isa => 'Str', ); sub _get_data { my $self = shift; return $self->data; } sub publish { my ( $self, $data ) = @_; $data ||= $self->_get_data(); my $path = $self->get_output_path; my $mode = ">>"; if ( $path =~ m/html$/ ) { $mode .= ':encoding(UTF-8)'; } my $fh = IO::File->new( $path, $mode ) or Carp::croak(qq/Can't open $path./); $fh->seek( 0, 0 ); $fh->truncate(0); $fh->print($data); $fh->close; return; } sub get_output_path { my $self = shift; my $outroot = $self->config->outroot; my $relpath = $self->relpath || $self->default_name; my $path = File::Spec->catfile( $outroot, $relpath ); return $path; } 1; __END__ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Sample����������������������������������������������������������������������������������������������000755��000765��000024�� 0�13225152263� 17610� 5����������������������������������������������������������������������������������������������������ustar�00martin��������������������������staff���������������������������000000��000000��Pod-ProjectDocs-0.50/t/sample/lib��������������������������������������������������������������������������������������������������������������������������������������Module.pm�������������������������������������������������������������������������������������������100644��000765��000024�� 337�13225152263� 21516� 0����������������������������������������������������������������������������������������������������ustar�00martin��������������������������staff���������������������������000000��000000��Pod-ProjectDocs-0.50/t/sample/lib/Sample�������������������������������������������������������������������������������������������������������������������������������package Sample::Module; use strict; use warnings; 1; __END__ =head1 NAME Sample::Module - Sample Module =head1 SYNOPSIS blah blah blah =head1 SEE ALSO L<Sample::Project> =head1 SOME "DIFFICULT" NODE WITH SPACES �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Config.pm�������������������������������������������������������������������������������������������100644��000765��000024�� 1514�13225152263� 21510� 0����������������������������������������������������������������������������������������������������ustar�00martin��������������������������staff���������������������������000000��000000��Pod-ProjectDocs-0.50/lib/Pod/ProjectDocs�������������������������������������������������������������������������������������������������������������������������������package Pod::ProjectDocs::Config; use strict; use warnings; our $VERSION = '0.50'; # VERSION use Moose; has 'title' => ( is => 'ro', default => "MyProject's Libraries", isa => 'Str', ); has 'desc' => ( is => 'ro', default => "manuals and libraries", isa => 'Str', ); has 'verbose' => ( is => 'ro', isa => 'Bool', ); has 'index' => ( is => 'ro', isa => 'Bool', ); has 'forcegen' => ( is => 'ro', isa => 'Bool', ); has 'nosourcecode' => ( is => 'ro', isa => 'Bool', ); has 'outroot' => ( is => 'ro', isa => 'Str', ); has 'libroot' => ( is => 'ro', isa => 'ArrayRef[Str]' ); has 'lang' => ( is => 'ro', default => 'en', isa => 'Str', ); has 'except' => ( is => 'ro', isa => 'ArrayRef[Str]' ); 1; __END__ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Parser.pm�������������������������������������������������������������������������������������������100644��000765��000024�� 4632�13225152263� 21543� 0����������������������������������������������������������������������������������������������������ustar�00martin��������������������������staff���������������������������000000��000000��Pod-ProjectDocs-0.50/lib/Pod/ProjectDocs�������������������������������������������������������������������������������������������������������������������������������package Pod::ProjectDocs::Parser; use strict; use warnings; our $VERSION = '0.50'; # VERSION use Moose; with 'Pod::ProjectDocs::Template'; use Pod::ProjectDocs::Parser::XHTML; has 'local_modules' => ( is => 'rw', isa => 'HashRef', ); sub gen_html { my ( $self, %args ) = @_; my $doc = $args{doc}; my $components = $args{components}; my $mgr_desc = $args{desc}; my $parser = Pod::ProjectDocs::Parser::XHTML->new(); # Use HTML5 with UTF8. $parser->html_doctype('<!DOCTYPE html>'); $parser->html_charset('UTF-8'); $parser->html_encode_chars(q{&<>'"}); # Add our custom CSS file. $parser->html_css( $components->{css}->relative_url($doc) ); # Generator options. $parser->index(1); $parser->title( $doc->name() . ' — ' . $doc->config()->title() ); $parser->anchor_items(1); $parser->no_errata_section(1); # Custom options. $parser->doc($doc); $parser->local_modules( $self->local_modules() ); $parser->current_files_output_path( $doc->get_output_path ); # Close <div class="pod"> (injected below) and add "generated by" content. $parser->html_footer( '</div><div class="footer">generated by <a href="http://metacpan.org/module/Pod::ProjectDocs">Pod::ProjectDocs</a></div></body></html>' ); # Start parsing/generation. my $output; $parser->output_string( \$output ); $parser->parse_file( $doc->origin ); # Add body header section and open <div class="pod">. my $header_box = $self->_generate_header_box( $doc, $mgr_desc ); $output =~ s/(<body[^>]*>)/$1$header_box\n<div class="pod">/; # Add HTML language information. my $language = $doc->config()->lang(); $output =~ s/<html>/<html lang="$language" xml:lang="$language">/; return $output; } sub _generate_header_box { my ( $self, $doc, $mgr_desc ) = @_; my $text = $self->process( $doc, $doc->data, { title => $doc->config->title, desc => $doc->config->desc, name => $doc->name, outroot => $doc->config->outroot, src => $doc->get_output_src_path, mgr_desc => $mgr_desc, nosourcecode => $doc->config->nosourcecode, } ); return $text if $^O ne 'MSWin32'; while ( $text =~ s|href="(.*?)\\(.*?)"|href="$1/$2"| ) { next; } return $text; } 1; ������������������������������������������������������������������������������������������������������Project.pm������������������������������������������������������������������������������������������100644��000765��000024�� 772�13225152263� 21702� 0����������������������������������������������������������������������������������������������������ustar�00martin��������������������������staff���������������������������000000��000000��Pod-ProjectDocs-0.50/t/sample/lib/Sample�������������������������������������������������������������������������������������������������������������������������������package Sample::Project; use strict; use warnings; 1; __END__ =head1 NAME Sample::Project - Sample project for testing Pod::ProjectDocs =head1 SYNOPSIS blah blah blah mäh =head1 DESCRIPTION I<foo>. See L</SYNOPSIS> for its usage and L<Sample::Module/SYNOPSIS> for Sample::Module. =head1 SEE ALSO L<perl>, L<Sample::Module>, L<Pod::ProjectDocs>, L<http://www.perl.org/>, L<Perl POD Syntax|perlpod> =head1 SOME "DIFFICULT" NODE WITH SPACES L<Sample::Module/SOME "DIFFICULT" NODE WITH SPACES> ������Template.pm�����������������������������������������������������������������������������������������100644��000765��000024�� 2431�13225152263� 22055� 0����������������������������������������������������������������������������������������������������ustar�00martin��������������������������staff���������������������������000000��000000��Pod-ProjectDocs-0.50/lib/Pod/ProjectDocs�������������������������������������������������������������������������������������������������������������������������������package Pod::ProjectDocs::Template; use strict; use warnings; our $VERSION = '0.50'; # VERSION use Moose::Role; use Template; use File::Basename; use File::Spec; use Carp(); has '_curpath' => ( is => 'rw', isa => 'Str', default => '', ); has '_tt' => ( is => 'ro', isa => 'Object', default => sub { my $self = shift; Template->new( { FILTERS => { relpath => sub { my $path = shift; my $curpath = $self->_curpath(); my ( $name, $dir ) = fileparse $curpath, qr/\.html/; return File::Spec->abs2rel( $path, $dir ); }, return2br => sub { my $text = shift; $text =~ s!\r\n!<br />!g; $text =~ s!\n!<br />!g; return $text; } }, } ); }, ); sub process { my ( $self, $doc, $data, $output ) = @_; $self->_curpath( $doc->get_output_path ); $self->_tt()->process( \$data, $output, \my $text ) or Carp::croak( $self->_tt()->error ); $self->_curpath(''); return $text; } 1; __END__ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������IndexPage.pm����������������������������������������������������������������������������������������100644��000765��000024�� 6567�13225152263� 22164� 0����������������������������������������������������������������������������������������������������ustar�00martin��������������������������staff���������������������������000000��000000��Pod-ProjectDocs-0.50/lib/Pod/ProjectDocs�������������������������������������������������������������������������������������������������������������������������������package Pod::ProjectDocs::IndexPage; use strict; use warnings; our $VERSION = '0.50'; # VERSION use Moose; with 'Pod::ProjectDocs::File', 'Pod::ProjectDocs::Template'; has 'default_name' => ( is => 'ro', isa => 'Str', default => 'index.html', ); has 'json' => ( is => 'rw', isa => 'Str', ); has 'components' => ( is => 'rw', isa => 'HashRef', ); has 'data' => ( is => 'ro', default => <<'DATA', <!DOCTYPE html> <html lang="[% lang %]" xml:lang="[% lang %]"> <head> <meta http-equiv="Content-Type" content="text/html; charset=[% charset %]" /> <title>[% title | html %]

[% title | html %]

Description [% desc | html_line_break %]

Search

DATA ); sub _get_data { my $self = shift; my $params = { title => $self->config->title, desc => $self->config->desc, lang => $self->config->lang, json => $self->json, charset => 'UTF-8', css_relative_url => $self->components->{css}->relative_url($self), }; my $text = $self->process( $self, $self->data, $params ); return $text; } 1; DocManager.pm100644000765000024 502313225152263 22302 0ustar00martinstaff000000000000Pod-ProjectDocs-0.50/lib/Pod/ProjectDocspackage Pod::ProjectDocs::DocManager; use strict; use warnings; our $VERSION = '0.50'; # VERSION use Moose; use Carp(); use File::Find; use IO::File; use Pod::ProjectDocs::Doc; has 'config' => ( is => 'ro', ); has 'desc' => ( is => 'rw', isa => 'Str', ); has 'suffix' => ( is => 'rw', ); has 'parser' => ( is => 'ro', ); has 'docs' => ( is => 'rw', isa => 'ArrayRef', default => sub { [] }, ); sub BUILD { my $self = shift; $self->_find_files(); return; } sub _find_files { my $self = shift; foreach my $dir ( @{ $self->config->libroot } ) { unless ( -e $dir && -d _ ) { Carp::croak(qq/$dir isn't detected or it's not a directory./); } } my $suffixs = $self->suffix; $suffixs = [$suffixs] if !ref $suffixs; foreach my $dir ( @{ $self->config->libroot } ) { foreach my $suffix (@$suffixs) { my $wanted = sub { return unless $File::Find::name =~ /\.$suffix$/; ( my $path = $File::Find::name ) =~ s#^\\.##; my ( $fname, $fdir ) = File::Basename::fileparse( $path, qr/\.$suffix/ ); my $reldir = File::Spec->abs2rel( $fdir, $dir ); $reldir ||= File::Spec->curdir; my $relpath = File::Spec->catdir( $reldir, $fname ); $relpath .= "."; $relpath .= $suffix; $relpath =~ s:\\:/:g if $^O eq 'MSWin32'; my $matched = 0; foreach my $regex ( @{ $self->config->except } ) { if ( $relpath =~ /$regex/ ) { $matched = 1; last; } } # check if there is actually any POD inside, skip otherwise my $content = join( '', IO::File->new( $File::Find::name, 'r' )->getlines() ); $matched = 1 if $content !~ m{^=(head1|head2|item|cut)}ismxg; unless ($matched) { push @{ $self->docs }, Pod::ProjectDocs::Doc->new( config => $self->config, origin => $path, origin_root => $dir, suffix => $suffix, ); } }; File::Find::find( { no_chdir => 1, wanted => $wanted }, $dir ); } } $self->docs( [ sort { $a->name cmp $b->name } @{ $self->docs } ] ); return; } 1; __END__ Parser000755000765000024 013225152263 21040 5ustar00martinstaff000000000000Pod-ProjectDocs-0.50/lib/Pod/ProjectDocsXHTML.pm100644000765000024 454013225152263 22435 0ustar00martinstaff000000000000Pod-ProjectDocs-0.50/lib/Pod/ProjectDocs/Parserpackage Pod::ProjectDocs::Parser::XHTML; use strict; use warnings; our $VERSION = '0.50'; # VERSION use base qw(Pod::Simple::XHTML); use File::Basename(); use File::Spec(); use HTML::Entities() ; # Required for proper entity detection in Pod::Simple::XHTML. sub new { my $class = shift; my $self = $class->SUPER::new(@_); $self->perldoc_url_prefix('http://metacpan.org/module/'); return $self; } sub doc { my ( $self, $doc ) = @_; if ( defined $doc ) { $self->{_doc} = $doc; } return $self->{_doc}; } sub local_modules { my ( $self, $modules ) = @_; if ( defined $modules ) { $self->{_local_modules} = $modules; } return $self->{_local_modules}; } sub current_files_output_path { my ( $self, $path ) = @_; if ( defined $path ) { $self->{_current_files_output_path} = $path; } return $self->{_current_files_output_path}; } sub resolve_pod_page_link { my ( $self, $module, $section ) = @_; my %module_map = %{ $self->local_modules() || {} }; if ( $module && $module_map{$module} ) { $section = defined $section ? '#' . $self->idify( $section, 1 ) : ''; my ( $filename, $directory ) = File::Basename::fileparse( $self->current_files_output_path, qr/\.html/ ); return File::Spec->abs2rel( $module_map{$module}, $directory ) . $section; } return $self->SUPER::resolve_pod_page_link( $module, $section ); } # # Function overrides to extract the Pod page description, e.g. # # =head1 Name # # Package::Name - Description line. # sub start_head1 { my ( $self, $attrs ) = @_; $self->{_in_head1} = 1; return $self->SUPER::start_head1($attrs); } sub end_head1 { my ( $self, $attrs ) = @_; delete $self->{_in_head1}; return $self->SUPER::end_head1($attrs); } sub handle_text { my ( $self, $text ) = @_; if ( $self->{_titleflag} ) { my ( $name, $description ) = $text =~ m{ ^ \s* ([^-]*?) \s* - \s* (.*?) \s* $}x; if ( $description && $self->doc() ) { $self->doc()->title($description); } delete $self->{_titleflag}; } elsif ( $self->{_in_head1} && $text eq 'NAME' ) { $self->{_titleflag} = 1; } else { delete $self->{_titleflag}; } return $self->SUPER::handle_text($text); } 1;