Module-Starter-Plugin-CGIApp-0.44000755001750001750 012577474360 17021 5ustar00jaldharjaldhar000000000000Module-Starter-Plugin-CGIApp-0.44/SIGNATURE000644001750001750 1542412577474360 20472 0ustar00jaldharjaldhar000000000000This file contains message digests of all files listed in MANIFEST, signed via the Module::Signature module, version 0.79. To verify the content in this distribution, first make sure you have Module::Signature installed, then type: % cpansign -v It will check each file's integrity, as well as the signature's validity. If "==> Signature verified OK! <==" is not displayed, the distribution may already have been compromised, and you should not run its Makefile.PL or Build.PL. -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 SHA1 a6ca9cd87d294560a80b7a47e1acc98ecee6a8b7 Build.PL SHA1 40dac8b88dfca1f4874d5879b52e090b055117e6 Changes SHA1 ce3f985435aece820b9be0e5217610895abe646b LICENSE SHA1 c242b56bd57ae3cd2eaeff7cd3d31e018706f8a0 MANIFEST SHA1 9d10f94124fcae34e9a7500cde4565a11be1621e MANIFEST.SKIP SHA1 439b3e5eef8f193bc8b295db6fb445ec83a9a4e8 META.json SHA1 c22e028e5ffad812e991aed97695bf69f919bd8c META.yml SHA1 8e6d588032d41595ece90004c31fba7bd6795fa7 Makefile.PL SHA1 993eec9e69dcb520922a7e1e7e1330f1b926b5b8 README SHA1 5259a3b84f7a4dc8ea541c13644ddc47588867b9 lib/Module/Starter/Plugin/CGIApp.pm SHA1 6ca6aced83f25d942129c0e69d0b4dd21fe5ddfa script/cgiapp-starter SHA1 cfbb033f0a37cc1e8542404a01b6e25483c79416 script/titanium-starter SHA1 8a0a63e135ba8bcbab4744aab395fe27faf537a7 share/default/00-signature.t SHA1 8c405c914b61c6171da873e4260c9634dbc8d76e share/default/01-load.t SHA1 f2deb3547161a1882fc024b19edd9ce3d502b068 share/default/Build.PL SHA1 91087ccb4525b5af4d168f946c7bb7878abb2ea2 share/default/Changes SHA1 2c5849241c482428e23801305486b9651de8baa7 share/default/LICENSE SHA1 80de39ff12248eb03cdc3a1d0701a66d94cd43fe share/default/MANIFEST SHA1 b1e0b8ac5a4d3f5d21c5d8608f4cca5fc140bdcc share/default/MANIFEST.SKIP SHA1 3b4a87109f774d03d534eae3a8678a8ec4da3ebe share/default/MI_Makefile.PL SHA1 0bf9519ecfe6c4d52c10a6332aae9b7e1ec87e85 share/default/Makefile.PL SHA1 ca6d9165583303ab4cefbf2016a7cda7df94d8b1 share/default/Module.pm SHA1 f7f208f403ce4acbaa51ec24b0278459cf6b87db share/default/README SHA1 96c92e8b0be1f3873dcd037e2b5be2a6b79f5e0d share/default/boilerplate.t SHA1 09a588879d1ca697c1fb6276984555c93b2adbe2 share/default/perl-critic.xt SHA1 f51a18380d49d3c6c29e05cd1dfc25efa6239ab0 share/default/perlcriticrc SHA1 d713fd862edafbecfccb2153603cad4273746f5b share/default/pod-coverage.xt SHA1 8a96ca5f326b34853dbb19b6dcf1c68f05d14ddb share/default/pod.xt SHA1 d63e698e19b436569a4bb12343e59f9d85d34cc2 share/default/runmode1.html SHA1 62569bc0b39f50facdc9ff28b03af784fda3e603 share/default/server.pl SHA1 97d2351c07af35ebd047968d8925b2a579e667a0 share/default/test-app.t SHA1 8a0a63e135ba8bcbab4744aab395fe27faf537a7 share/titanium/00-signature.t SHA1 8c405c914b61c6171da873e4260c9634dbc8d76e share/titanium/01-load.t SHA1 3fef494bd07a12fcbde6b6dbf47a64fad3c2b644 share/titanium/Build.PL SHA1 91087ccb4525b5af4d168f946c7bb7878abb2ea2 share/titanium/Changes SHA1 2c5849241c482428e23801305486b9651de8baa7 share/titanium/LICENSE SHA1 80de39ff12248eb03cdc3a1d0701a66d94cd43fe share/titanium/MANIFEST SHA1 b1e0b8ac5a4d3f5d21c5d8608f4cca5fc140bdcc share/titanium/MANIFEST.SKIP SHA1 e4015682ce1c6fc90e7ac8a3a9d8950ecaa091f8 share/titanium/MI_Makefile.PL SHA1 c74fb4268cc2be2c56e0f66e84185f935b13e367 share/titanium/Makefile.PL SHA1 ed55fac92a4da155378aa1f879e78dad97fdb9cf share/titanium/Module.pm SHA1 1155e5ca34f948b53cbd1d6f0901ac7ad4270902 share/titanium/README SHA1 96c92e8b0be1f3873dcd037e2b5be2a6b79f5e0d share/titanium/boilerplate.t SHA1 09a588879d1ca697c1fb6276984555c93b2adbe2 share/titanium/perl-critic.xt SHA1 f51a18380d49d3c6c29e05cd1dfc25efa6239ab0 share/titanium/perlcriticrc SHA1 d713fd862edafbecfccb2153603cad4273746f5b share/titanium/pod-coverage.xt SHA1 8a96ca5f326b34853dbb19b6dcf1c68f05d14ddb share/titanium/pod.xt SHA1 d63e698e19b436569a4bb12343e59f9d85d34cc2 share/titanium/runmode1.html SHA1 62569bc0b39f50facdc9ff28b03af784fda3e603 share/titanium/server.pl SHA1 97d2351c07af35ebd047968d8925b2a579e667a0 share/titanium/test-app.t SHA1 ca1a0209441579bee93838d71e4cd9e24f8dd902 t/00-signature.t SHA1 d766ad7320334c1280ab24f6c8ac51fb64031d40 t/01-load.t SHA1 900da08cf6dd1cdce2465c91147450d0f5971c7c t/common.pm SHA1 19f69513bc6e68333125967647dbb31a851fae59 t/eumm/MANIFEST SHA1 afc544ce1d32dbb171d6a529152885d9bccc5248 t/eumm/Makefile.PL SHA1 f6ba525ca859444b94e53b55b9bb86554c75adf5 t/eumm/README SHA1 abe76c767641ac56f0a1e79f6e7c3fa264f52d1c t/eumm/t/boilerplate.t SHA1 24b61c542fb84aa072f96b565c9dd379ea5f7c29 t/expected/Changes SHA1 e3569e482a26ad33b319dae4e515fbddc5993ef0 t/expected/LICENSE SHA1 b1e0b8ac5a4d3f5d21c5d8608f4cca5fc140bdcc t/expected/MANIFEST.SKIP SHA1 0aca80bf7eb75087b9ae8c9563cbb0f6c0a8d261 t/expected/lib/Foo/Bar.pm SHA1 dd544a6a552a4ad19ec3591d0d3193decd753e23 t/expected/lib/Foo/Baz.pm SHA1 98a53f79544711343be3d2a24ef17ceb722958ab t/expected/server.pl SHA1 d63e698e19b436569a4bb12343e59f9d85d34cc2 t/expected/share/templates/runmode1.html SHA1 8a0a63e135ba8bcbab4744aab395fe27faf537a7 t/expected/t/00-signature.t SHA1 effd90546b0bd152ffae6988cfd6e6c1f9a52436 t/expected/t/01-load.t SHA1 81913d3ec76c7c225a1fd9d604097fc471a79a6e t/expected/t/test-app.t SHA1 b858cb282617fb0956d960215c8e84d1ccf909c6 t/expected/t/www/PUT.STATIC.CONTENT.HERE SHA1 25409424b2fb12a85d4b7063195a2d4042e79314 t/expected/xt/perl-critic.t SHA1 f51a18380d49d3c6c29e05cd1dfc25efa6239ab0 t/expected/xt/perlcriticrc SHA1 d713fd862edafbecfccb2153603cad4273746f5b t/expected/xt/pod-coverage.t SHA1 8a96ca5f326b34853dbb19b6dcf1c68f05d14ddb t/expected/xt/pod.t SHA1 08dc31e52c4bf5ed29cd083134c152e457a2a686 t/extutils-makemaker.t SHA1 3538acda10538075f49d4597738b5a336ac894d4 t/mb/Build.PL SHA1 936db2a8177218e2dc75c110b66ac6624cd68d0c t/mb/MANIFEST SHA1 ca9e4671972189d3024a65248f69bc20a0ab9861 t/mb/README SHA1 d9343608d8651382dbfe03275d7d63d43d86793b t/mb/t/boilerplate.t SHA1 19f69513bc6e68333125967647dbb31a851fae59 t/mi/MANIFEST SHA1 e94e11975b58787610556d5b6f74da75419b8ba7 t/mi/Makefile.PL SHA1 f6ba525ca859444b94e53b55b9bb86554c75adf5 t/mi/README SHA1 abe76c767641ac56f0a1e79f6e7c3fa264f52d1c t/mi/t/boilerplate.t SHA1 5f51feea37852a2d858469da395fb254808a4acd t/module-build.t SHA1 8124b54339dce05e47bc2b25fd40566b818017c1 t/module-install.t SHA1 f086b69d330de12bce56a9fa8b65ca4d4da70ad3 xt/distmanifest.t SHA1 42f220463b607d72e86f9297e767591a68a1da4a xt/hasversion.t SHA1 76e878f3aa3044f37fede07af01c5ef6e2ce730d xt/kwalitee.t SHA1 5f59fbc20e0125b835550c698a694b97df09c3dc xt/meta.t SHA1 7c77fe425347bc7d8504853e27e3d5218457ae12 xt/minimumversion.t SHA1 e64c16d09c2b7821f3110fa33fd5930b97decfad xt/perl-critic.t SHA1 f51a18380d49d3c6c29e05cd1dfc25efa6239ab0 xt/perlcriticrc SHA1 d713fd862edafbecfccb2153603cad4273746f5b xt/pod-coverage.t SHA1 8a96ca5f326b34853dbb19b6dcf1c68f05d14ddb xt/pod.t -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlX+ePAACgkQIN9eM6kfjrq4MwCgx7paeAFnQImZuAIUPoEzjReS FLgAn2BR/dOlhcDqUDsv3Fd/syqm+d0b =vv3M -----END PGP SIGNATURE----- Module-Starter-Plugin-CGIApp-0.44/LICENSE000444001750001750 3621112577474360 20206 0ustar00jaldharjaldhar000000000000Copyright (C) 2015, Consolidated Braincells Inc. All rights reserved. This distribution is free software; you can redistribute it and/or modify it under the terms of either: 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 version 1.0 or a later version. 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 ---------------------------------------------------------------------------- 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 Module-Starter-Plugin-CGIApp-0.44/README000444001750001750 660512577474360 20045 0ustar00jaldharjaldhar000000000000Module-Starter-Plugin-CGIApp This is a plugin for Module::Starter that builds you a skeleton CGI::Application module with all the extra files needed to package it for CPAN. You can customize the output using HTML::Template. INSTALLATION If you have the Module::Signature module installed, you can verify the integrity of this distribution by typing: cpansign -v Module::Signature requires GnuPG which you can get from: http://www.gnupg.org/download/ A binary version for Windows is available from that page. Then to install this module, run the following commands: perl Build.pl ./Build ./Build test ./Build install On Windows you don't need to type the preliminary ./ Alternatively, you can do: perl Makefile.PL make make test make install If you are using ActiveState perl on Windows and you don't have a make utility, you can download nmake from: http://download.microsoft.com/download/vc15/patch/1.52/w95/en-us/nmake15.exe (Replace make with nmake in the instructions above if you are using it.) If you are using Strawberry perl on Windows, it comes with a make utility called dmake. (Replace make with dmake in the instructions above if you are using it.) NOTE: At the moment, some of the tests will fail on Windows if the path to the directory you unpacked the distribution in has spaces in it. Either skip the tests or move to another directory. DEPENDENCIES This module requires these other modules: perl 5.008 File::ShareDir HTML::Template Module::Starter 1.70 At build time you will need the above modules plus the following if you want to run the tests: File::Copy::Recursive File::DirCompare Test::More Test::MockTime Time::Piece 1.12 The signature can be tested by installing the following module: Module::Signature and setting the environment variable TEST_SIGNATURE to 1. Further tests are enabled by setting the environment variable RELEASE_TESTING to 1 and installing the following modules: Perl::Critic 1.098 Perl::MinimumVersion 1.20 Pod::Coverage 0.18 Pod::Simple 3.07 Test::CPAN::Meta 0.12 Test::DistManifest 1.003 Test::HasVersion 0.012 Test::Kwalitee Test::MinimumVersion 0.008 Test::Perl::Critic 1.01 Test::Pod 1.26 Test::Pod::Coverage 1.08 They are all available on CPAN (http://www.cpan.org) SUPPORT AND DOCUMENTATION After installing, you can find documentation for this module with the perldoc command. perldoc Module::Starter::Plugin::CGIApp You can also look for information at: Search CPAN http://search.cpan.org/dist/Module-Starter-Plugin-CGIApp CPAN Request Tracker: http://rt.cpan.org/NoAuth/Bugs.html?Dist=Module-Starter-Plugin-CGIApp AnnoCPAN, annotated CPAN documentation: http://annocpan.org/dist/Module-Starter-Plugin-CGIApp CPAN Ratings: http://cpanratings.perl.org/d/Module-Starter-Plugin-CGIApp COPYRIGHT AND LICENCE Copyright (C) 2015, Consolidated Braincells Inc. All Rights Reserved. This distribution is free software; you can redistribute it and/or modify it under the terms of either: 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 version 1.0 or a later version. The full text of the license can be found in the LICENSE file included with this distribution. Module-Starter-Plugin-CGIApp-0.44/Build.PL000444001750001750 257412577474360 20462 0ustar00jaldharjaldhar000000000000use strict; use warnings; use File::Find; use Module::Build; my $builder = Module::Build->new( module_name => 'Module::Starter::Plugin::CGIApp', license => 'perl', dist_author => 'Jaldhar H. Vyas ', dist_version => '0.44', share_dir => 'share', pm_files => { 'lib/Module/Starter/Plugin/CGIApp.pm' => 'lib/Module/Starter/Plugin/CGIApp.pm', }, script_files => { 'script/cgiapp-starter' => [], 'script/titanium-starter' => [], }, build_requires => { 'File::Copy::Recursive' => 0, 'File::DirCompare' => 0, 'Test::More' => 0, 'Test::MockTime' => 0, 'Time::Piece' => 1.12, }, requires => { 'perl' => 5.008, 'File::ShareDir' => 0, 'Module::Starter' => 1.70, 'HTML::Template' => 0, }, meta_merge => { resources => { repository => 'http://github.com/jaldhar/Module-Starter-Plugin-CGIApp', homepage => 'http://jaldhar.github.com/Module-Starter-Plugin-CGIApp/', }, }, add_to_cleanup => [ 'Module-Starter-Plugin-CGIApp-*' ], create_makefile_pl => 'small', sign => 1, ); $builder->create_build_script(); Module-Starter-Plugin-CGIApp-0.44/Makefile.PL000444001750001750 44412577474357 21120 0ustar00jaldharjaldhar000000000000# Note: this file was auto-generated by Module::Build::Compat version 0.4214 require 5.008; use Module::Build::Compat 0.02; Module::Build::Compat->run_build_pl(args => \@ARGV); require Module::Build; Module::Build::Compat->write_makefile(build_class => 'Module::Build'); Module-Starter-Plugin-CGIApp-0.44/MANIFEST.SKIP000444001750001750 17212577474360 21034 0ustar00jaldharjaldhar000000000000#defaults ^Makefile$ ^blib/ ^pm_to_blib ^blibdirs ^Build$ ^Build.bat$ ^_build/ .git .svn .tmp ^MYMETA.yml$ ^MYMETA\.json$ Module-Starter-Plugin-CGIApp-0.44/MANIFEST000444001750001750 375312577474360 20317 0ustar00jaldharjaldhar000000000000Build.PL Changes lib/Module/Starter/Plugin/CGIApp.pm LICENSE Makefile.PL MANIFEST MANIFEST.SKIP META.yml README script/cgiapp-starter script/titanium-starter share/default/00-signature.t share/default/01-load.t share/default/Build.PL share/default/boilerplate.t share/default/Changes share/default/LICENSE share/default/Makefile.PL share/default/MANIFEST share/default/MANIFEST.SKIP share/default/MI_Makefile.PL share/default/Module.pm share/default/perl-critic.xt share/default/perlcriticrc share/default/pod-coverage.xt share/default/pod.xt share/default/README share/default/runmode1.html share/default/server.pl share/default/test-app.t share/titanium/00-signature.t share/titanium/01-load.t share/titanium/Build.PL share/titanium/Changes share/titanium/LICENSE share/titanium/MANIFEST share/titanium/MANIFEST.SKIP share/titanium/MI_Makefile.PL share/titanium/Makefile.PL share/titanium/Module.pm share/titanium/README share/titanium/boilerplate.t share/titanium/perl-critic.xt share/titanium/perlcriticrc share/titanium/pod-coverage.xt share/titanium/pod.xt share/titanium/runmode1.html share/titanium/server.pl share/titanium/test-app.t t/00-signature.t t/01-load.t t/common.pm t/eumm/Makefile.PL t/eumm/MANIFEST t/eumm/README t/eumm/t/boilerplate.t t/expected/Changes t/expected/lib/Foo/Bar.pm t/expected/lib/Foo/Baz.pm t/expected/LICENSE t/expected/MANIFEST.SKIP t/expected/server.pl t/expected/share/templates/runmode1.html t/expected/t/00-signature.t t/expected/t/01-load.t t/expected/t/test-app.t t/expected/t/www/PUT.STATIC.CONTENT.HERE t/expected/xt/perl-critic.t t/expected/xt/perlcriticrc t/expected/xt/pod-coverage.t t/expected/xt/pod.t t/extutils-makemaker.t t/mb/Build.PL t/mb/MANIFEST t/mb/README t/mb/t/boilerplate.t t/mi/Makefile.PL t/mi/MANIFEST t/mi/README t/mi/t/boilerplate.t t/module-build.t t/module-install.t xt/distmanifest.t xt/hasversion.t xt/kwalitee.t xt/meta.t xt/minimumversion.t xt/perl-critic.t xt/perlcriticrc xt/pod-coverage.t xt/pod.t META.json SIGNATURE Added here by Module::Build Module-Starter-Plugin-CGIApp-0.44/Changes000444001750001750 1662712577474360 20505 0ustar00jaldharjaldhar000000000000Revision history for Module-Starter-Plugin-CGIApp 0.44 Sun Sep 20 05:09:32 EDT 2015 *sigh* git screwup means some of the metadata might not actually match what's in the package. Uploading a new version just to be sure. 0.43 Sun Sep 20 04:43:35 EDT 2015 Internal: --------- Fixed to work with newer versions of Module-Starter. RT #101984, #66240 Added dependency on Module::Starter >= 1.70 In Created distributions: ------------------------- t/boilerplate.t is added to MANIFEST. More work still needs to be done for Module-Starter parity... 0.42 Wed May 16 19:17:15 EDT 2012 Internal: --------- The license of this module is "Same as Perl" which somewhere along the line I thought meant GPL 2+/Artistic 2+ when actually it is GPL 1+/Artistic 1+. This is now fixed in all the relevant places. In Created distributions: ------------------------- The same license confusion occurred here too. Fixed. 0.41 Thu May 10 23:54:01 EDT 2012 Internal: --------- Forgot to mention File::ShareDir as a dependency. While I'm at it, I normalized the format of copyright statements everywhere and updated the copyright year of this distro to 2012. 0.40 Thu May 10 22:58:23 EDT 2012 Internal: --------- Breakage caused by newer versions of Module::Starter (RT#71734) has been fixed. Module has been updated to use the latest features of Module::Starter. Author tests have been moved into xt directory and brought up to current best practices. Templates have been moved into a share directory using File::ShareDir. Templates have been improved in various minor ways. In Created distributions: ------------------------- Author tests are brought up to current best practices and now go into the xt directory so they don't have to be run by end users. Templates go into a shared directory using File::ShareDir instead of the old method of putting them in @INC Instead of pgp.mit.edu, t/00-signature.t will now use pool.sks-keyservers.net for key queries. MANIFEST.SKIP will also skip .git 0.30 Sat Mar 6 22:54:25 EST 2010 cgiapp-starter and titanium-starter had got broken during the last release due to an errant local and were unable to find the default template directory. They should work correctly now. t/boilerplate.t in generated dists had got broken during the last set of updates. It should work correctly now. It will now also check that you do not have a boilerplate abstract in your buildscript. Previously there was support for a generated dist with multiple modules but it didn't really work. Now it does. This justifies a bump in the version number I think. The RT address in generated modules (for bug reporting) is based on the distro name instead of the module name now. 0.22 Thu Mar 4 01:52:09 EST 2010 t/00-signature.t was wrong in the module and generated dists. Now it will only be carried out if the envvar TEST_SIGNATURE is set. Unneeded dependencies deleted from the build scripts in the module and generated dists. README in the module and generated dists updated to reflect these changes. 0.21 Wed Mar 3 15:28:02 EST 2010 Fixed test failures on Windows (and possibly other platforms with disgusting perverted non-unixy line endings.) Thanks csjewell, jdb, and samuraijack on #win32@irc.perl.org and almut, ambrus, and banesong on Perl Monks for their help in solving these problems. Upped the recommended perl version to 5.008. 0.20 Sun Feb 28 14:02:44 EST 2010 t/test-app.t in generated dists now passes an object to $mech->app to match what is done is server.pl Tests in generated dists now follow Test::XT recommendations. If the license of a generated dist is 'perl', the license blurb in the module and README explicitly mentions GPL+Artistic instead of just 'same as perl'. A LICENSE file is added to the dist where you can put the license terms. Hopefully the problem with Build mistakenly trying to run the Makefile.PLs from templates is resolved. Revamped test suite should be more comprehensive than before. In line with Test::XT recommendations, test relevant to the author only, will be skipped unless envvar RELEASE_TESTING=1. See README. 0.10 Thu Jan 15 21:12:55 EST 2009 Added a placeholder file in t/www in generated distributions as the empty directory was causing error messages. More build fixes for Windows. I think I actually have got it right this time. One problem remains. Tests will fail if the directory path to where you have unpacked the module has spaces anywhere in it. What's up with that? Ensured that MANIFEST in generated distributions always uses / as the directory seperator regardless of operating system. Added some entries to MANIFEST.SKIP in generated distributions to stop the signature test from failing under Windows. Thanks to Ron Savage and Cosimo Streppone from the cgiapp list and ikegami, cdarke, and andreas1234567 on Perl Monks for their help in solving Windows issues. 0.08 Fri Jan 9 18:24:07 EST 2009 This version just has changes to the build process which hopefully will make it work better under Windows. 0.07 Mon Jan 5 17:24:30 EST 2009 No longer build depends on Test::Builder. By popular demand, templates use $self instead of $c. Distributions now include a directory, t/www for static files. server.pl has been updated to use it. Some fixes to tests so the module will build correctly on Windows thanks to David Scott Some extra documentation for building on Windows added. HELP WANTED: despite my best efforts, I am not sure this module is working correctly under Windows. If you find problems, please submit a bug report, or even better, a fix. 0.05 Thu Sep 18 22:24:00 EDT 2008 Added cgiapp_starter script thanks to Mark Stosberg Building with Module::Install and ExtUtils::MakeMaker should work properly now. Added some tests so we can check if the modules we are building are actually complete. Removed cvsignore from the default templates. Generated distributions will now include a CGI::Application::Server script to use as a development server. Generated distributions no longer require Test::Builder. Added a set of templates that use Titanium instead of CGI::Application. Also added titanium-starter which works like cgiapp-starter but uses the Titanium templates. 0.01 Sun Mar 23 02:18:51 EDT 2008 First version, released on an unsuspecting world. Creating modules that use ExtUtils::MakeMaker or Module::Install is probably buggy. Please send bug reports and patches. Module-Starter-Plugin-CGIApp-0.44/META.yml000444001750001750 166312577474360 20435 0ustar00jaldharjaldhar000000000000--- abstract: 'template based module starter for CGI apps.' author: - 'Jaldhar H. Vyas ' build_requires: File::Copy::Recursive: '0' File::DirCompare: '0' Test::MockTime: '0' Test::More: '0' Time::Piece: '1.12' configure_requires: Module::Build: '0.42' dynamic_config: 1 generated_by: 'Module::Build version 0.4214, CPAN::Meta::Converter version 2.150001' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Module-Starter-Plugin-CGIApp provides: Module::Starter::Plugin::CGIApp: file: lib/Module/Starter/Plugin/CGIApp.pm version: '0.44' requires: File::ShareDir: '1.00' HTML::Template: '0' Module::Starter: '1.7' perl: '5.008' resources: homepage: http://jaldhar.github.com/Module-Starter-Plugin-CGIApp/ license: http://dev.perl.org/licenses/ repository: http://github.com/jaldhar/Module-Starter-Plugin-CGIApp version: '0.44' Module-Starter-Plugin-CGIApp-0.44/META.json000444001750001750 271012577474360 20577 0ustar00jaldharjaldhar000000000000{ "abstract" : "template based module starter for CGI apps.", "author" : [ "Jaldhar H. Vyas " ], "dynamic_config" : 1, "generated_by" : "Module::Build version 0.4214", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Module-Starter-Plugin-CGIApp", "prereqs" : { "build" : { "requires" : { "File::Copy::Recursive" : "0", "File::DirCompare" : "0", "Test::MockTime" : "0", "Test::More" : "0", "Time::Piece" : "1.12" } }, "configure" : { "requires" : { "Module::Build" : "0.42" } }, "runtime" : { "requires" : { "File::ShareDir" : "1.00", "HTML::Template" : "0", "Module::Starter" : "1.7", "perl" : "5.008" } } }, "provides" : { "Module::Starter::Plugin::CGIApp" : { "file" : "lib/Module/Starter/Plugin/CGIApp.pm", "version" : "0.44" } }, "release_status" : "stable", "resources" : { "homepage" : "http://jaldhar.github.com/Module-Starter-Plugin-CGIApp/", "license" : [ "http://dev.perl.org/licenses/" ], "repository" : { "url" : "http://github.com/jaldhar/Module-Starter-Plugin-CGIApp" } }, "version" : "0.44" } Module-Starter-Plugin-CGIApp-0.44/lib000755001750001750 012577474360 17567 5ustar00jaldharjaldhar000000000000Module-Starter-Plugin-CGIApp-0.44/lib/Module000755001750001750 012577474360 21014 5ustar00jaldharjaldhar000000000000Module-Starter-Plugin-CGIApp-0.44/lib/Module/Starter000755001750001750 012577474360 22440 5ustar00jaldharjaldhar000000000000Module-Starter-Plugin-CGIApp-0.44/lib/Module/Starter/Plugin000755001750001750 012577474360 23676 5ustar00jaldharjaldhar000000000000Module-Starter-Plugin-CGIApp-0.44/lib/Module/Starter/Plugin/CGIApp.pm000444001750001750 4612512577474360 25464 0ustar00jaldharjaldhar000000000000=head1 NAME Module::Starter::Plugin::CGIApp - template based module starter for CGI apps. =head1 SYNOPSIS use Module::Starter qw( Module::Starter::Plugin::CGIApp ); Module::Starter->create_distro(%args); =head1 ABSTRACT This is a plugin for L that builds you a skeleton L module with all the extra files needed to package it for CPAN. You can customize the output using L. =cut package Module::Starter::Plugin::CGIApp; use base 'Module::Starter::Simple'; use warnings; use strict; use Carp qw( croak ); use English qw( -no_match_vars ); use File::Basename; use File::Path qw( mkpath ); use File::Spec (); use Module::Starter::BuilderSet; use HTML::Template; =head1 VERSION This document describes version 0.44 =cut our $VERSION = '0.44'; =head1 DESCRIPTION This module subclasses L and includes functionality similar to L. This document only describes the methods which are overridden from those modules or are new. Only developers looking to extend this module need to read this. If you just want to use L, read the docs for L or L instead. =head1 METHODS =head2 new ( %args ) This method calls the C supermethod from L and then initializes the template store. (See C.) =cut sub new { my ( $proto, %opts ) = @_; my $class = ref $proto || $proto; my $self = $class->SUPER::new(%opts); $self->{templates} = { $self->templates }; return bless $self => $class; } =head2 create_distro ( %args ) This method works as advertised in L. =cut sub create_distro { my ( $either, %opts ) = @_; ( ref $either ) or $either = $either->new(%opts); my $self = $either; # Supposedly the *-starter scripts can handle multiple --builder options # but this doesn't work (and IMO doesn't make sense anyway.) So in the # case multiple builders were specified, we just pick the first one. if ( ref $self->{builder} eq 'ARRAY' ) { $self->{builder} = $self->{builder}->[0]; } my @modules; foreach my $arg ( @{ $self->{modules} } ) { push @modules, ( split /[,]/msx, $arg ); } if ( !@modules ) { croak "No modules specified.\n"; } for (@modules) { if ( !/\A [[:alpha:]_] \w* (?: [:] [:] [\w]+ )* \Z /imsx ) { croak "Invalid module name: $_"; } } $self->{modules} = \@modules; if ( !$self->{author} ) { croak "Must specify an author\n"; } if ( !$self->{email} ) { croak "Must specify an email address\n"; } ( $self->{email_obfuscated} = $self->{email} ) =~ s/@/ at /msx; $self->{license} ||= 'perl'; $self->{main_module} = $self->{modules}->[0]; if ( !$self->{distro} ) { $self->{distro} = $self->{main_module}; $self->{distro} =~ s/::/-/gmsx; } $self->{basedir} = $self->{dir} || $self->{distro}; $self->create_basedir; my @files; push @files, $self->create_modules( @{ $self->{modules} } ); push @files, $self->create_t( @{ $self->{modules} } ); push @files, $self->create_xt( @{ $self->{modules} } ); push @files, $self->create_tmpl(); my %build_results = $self->create_build(); push @files, @{ $build_results{files} }; push @files, $self->create_Changes; push @files, $self->create_LICENSE; push @files, $self->create_README( $build_results{instructions} ); push @files, $self->create_MANIFEST_SKIP; push @files, $self->create_perlcriticrc; push @files, $self->create_server_pl; push @files, 'MANIFEST'; $self->create_MANIFEST( sub { _create_manifest( $self, @files ) } ); return; } sub _create_manifest { my ( $self, @files ) = @_; my $file = File::Spec->catfile( $self->{basedir}, 'MANIFEST' ); open my $fh, '>', $file or croak "Can't open file $file: $OS_ERROR\n"; foreach my $file ( sort @files ) { print {$fh} "$file\n" or croak "$OS_ERROR\n"; } close $fh or croak "Can't close file $file: $OS_ERROR\n"; return; } =head2 create_LICENSE( ) This method creates a C file in the distribution's directory which can hold the distribution's license terms. =cut sub create_LICENSE { ## no critic 'NamingConventions::Capitalization' my $self = shift; my $fname = File::Spec->catfile( $self->{basedir}, 'LICENSE' ); $self->create_file( $fname, $self->LICENSE_guts() ); $self->progress("Created $fname"); return 'LICENSE'; } =head2 create_MANIFEST_SKIP( ) This method creates a C file in the distribution's directory so that unneeded files can be skipped from inclusion in the distribution. =cut sub create_MANIFEST_SKIP { ## no critic 'NamingConventions::Capitalization' my $self = shift; my $fname = File::Spec->catfile( $self->{basedir}, 'MANIFEST.SKIP' ); $self->create_file( $fname, $self->MANIFEST_SKIP_guts() ); $self->progress("Created $fname"); return 'MANIFEST.SKIP'; } =head2 create_modules( @modules ) This method will create a starter module file for each module named in I<@modules>. It is only subclassed from L here so we can change the I tmpl_var to be the distro name instead of the module name. =cut sub create_modules { my ( $self, @modules ) = @_; my @files; my $rtname = lc $self->{distro}; for my $module (@modules) { push @files, $self->_create_module( $module, $rtname ); } return @files; } =head2 create_perlcriticrc( ) This method creates a C in the distribution's author test directory so that the behavior of C can be modified. =cut sub create_perlcriticrc { my $self = shift; my @dirparts = ( $self->{basedir}, 'xt' ); my $tdir = File::Spec->catdir(@dirparts); if ( not -d $tdir ) { mkpath($tdir); $self->progress("Created $tdir"); } my $fname = File::Spec->catfile( @dirparts, 'perlcriticrc' ); $self->create_file( $fname, $self->perlcriticrc_guts() ); $self->progress("Created $fname"); return 'xt/perlcriticrc'; } =head2 create_server_pl( ) This method creates C in the distribution's root directory. =cut sub create_server_pl { my $self = shift; my $fname = File::Spec->catfile( $self->{basedir}, 'server.pl' ); $self->create_file( $fname, $self->server_pl_guts() ); $self->progress("Created $fname"); return 'server.pl'; } =head2 create_t( @modules ) This method creates a bunch of *.t files. I<@modules> is a list of all modules in the distribution. =cut sub create_t { my ( $self, @modules ) = @_; my %t_files = $self->t_guts(@modules); my @files = map { $self->_create_t( 't', $_, $t_files{$_} ) } keys %t_files; # This next part is for the static files dir t/www my @dirparts = ( $self->{basedir}, 't', 'www' ); my $twdir = File::Spec->catdir(@dirparts); if ( not -d $twdir ) { mkpath($twdir); $self->progress("Created $twdir"); } my $placeholder = File::Spec->catfile( @dirparts, 'PUT.STATIC.CONTENT.HERE' ); $self->create_file( $placeholder, q{ } ); $self->progress("Created $placeholder"); push @files, 't/www/PUT.STATIC.CONTENT.HERE'; return @files; } =head2 create_tmpl( ) This method takes all the template files ending in .html (representing L's and installs them into a directory under the distro tree. For instance if the distro was called C, the templates would be installed in C. Note the files will just be copied over not rendered. =cut sub create_tmpl { my $self = shift; return $self->tmpl_guts(); } =head2 create_xt( @modules ) This method creates a bunch of *.t files for author tests. I<@modules> is a list of all modules in the distribution. =cut sub create_xt { my ( $self, @modules ) = @_; my %xt_files = $self->xt_guts(@modules); my @files = map { $self->_create_t( 'xt', $_, $xt_files{$_} ) } keys %xt_files; return @files; } =head2 render( $template, \%options ) This method is given an L and options and returns the resulting document. Data in the C object which represents a reference to an array @foo is transformed into an array of hashes with one key called C<$foo_item> in order to make it usable in an L C. For example: $data = ['a'. 'b', 'c']; would become: $data = [ { data_item => 'a' }, { data_item => 'b' }, { data_item => 'c' }, ]; so that in the template you could say: =cut sub render { my ( $self, $template, $options ) = @_; # we need a local copy of $options otherwise we get recursion in loops # because of [1] my %opts = %{$options}; $opts{nummodules} = scalar @{ $self->{modules} }; $opts{year} = $self->_thisyear(); $opts{license_blurb} = $self->_license_blurb(); $opts{datetime} = scalar localtime; $opts{buildscript} = Module::Starter::BuilderSet->new()->file_for_builder( $self->{builder} ); foreach my $key ( keys %{$self} ) { next if defined $opts{$key}; $opts{$key} = $self->{$key}; } # [1] HTML::Templates wants loops to be arrays of hashes not plain arrays foreach my $key ( keys %opts ) { if ( ref $opts{$key} eq 'ARRAY' ) { my @temp = (); for my $option ( @{ $opts{$key} } ) { push @temp, { "${key}_item" => $option }; } $opts{$key} = [@temp]; } } my $t = HTML::Template->new( die_on_bad_params => 0, scalarref => \$template, ) or croak "Can't create template $template"; $t->param( \%opts ); return $t->output; } =head2 templates ( ) This method reads in the template files and populates the object's templates attribute. The module template directory is found by checking the C environment variable and then the config option C. =cut sub templates { my ($self) = @_; my %template; my $template_dir = ( $ENV{MODULE_TEMPLATE_DIR} || $self->{template_dir} ) or croak 'template dir not defined'; if ( !-d $template_dir ) { croak "template dir does not exist: $template_dir"; } foreach ( glob "$template_dir/*" ) { my $basename = basename $_; next if ( not -f $_ ) or ( $basename =~ /\A [.]/msx ); open my $template_file, '<', $_ or croak "couldn't open template: $_"; $template{$basename} = do { local $RS = undef; <$template_file>; }; close $template_file or croak "couldn't close template: $_"; } return %template; } =head2 Build_PL_guts($main_module, $main_pm_file) This method is called by L and returns text used to populate Build.PL when the builder is L; I<$main_pm_file> is the filename of the distribution's main module, I<$main_module>. =cut sub Build_PL_guts { ## no critic 'NamingConventions::Capitalization' my ( $self, $main_module, $main_pm_file ) = @_; my %options; $options{main_module} = $main_module; $options{main_pm_file} = $main_pm_file; my $template = $self->{templates}{'Build.PL'}; return $self->render( $template, \%options ); } =head2 Changes_guts Implements the creation of a C file. =cut sub Changes_guts { ## no critic 'NamingConventions::Capitalization' my $self = shift; my %options; my $template = $self->{templates}{Changes}; return $self->render( $template, \%options ); } =head2 LICENSE_guts Implements the creation of a C file. =cut sub LICENSE_guts { ## no critic 'NamingConventions::Capitalization' my $self = shift; my %options; my $template = $self->{templates}{LICENSE}; return $self->render( $template, \%options ); } sub _license_blurb { my $self = shift; my $license_blurb; my $license_record = $self->_license_record(); if ( defined $license_record ) { if ( $license_record->{license} eq 'perl' ) { $license_blurb = <<'EOT'; This distribution is free software; you can redistribute it and/or modify it under the terms of either: 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 version 1.0 or a later version. EOT } else { $license_blurb = $license_record->{blurb}; } } else { $license_blurb = <<"EOT"; This program is released under the following license: $self->{license} EOT } chomp $license_blurb; return $license_blurb; } =head2 Makefile_PL_guts($main_module, $main_pm_file) This method is called by L and returns text used to populate Makefile.PL when the builder is L; I<$main_pm_file> is the filename of the distribution's main module, I<$main_module>. =cut sub Makefile_PL_guts { ## no critic 'NamingConventions::Capitalization' my ( $self, $main_module, $main_pm_file ) = @_; my %options; $options{main_module} = $main_module; $options{main_pm_file} = $main_pm_file; my $template = $self->{templates}{'Makefile.PL'}; return $self->render( $template, \%options ); } =head2 MANIFEST_SKIP_guts Implements the creation of a C file. =cut sub MANIFEST_SKIP_guts { ## no critic 'NamingConventions::Capitalization' my $self = shift; my %options; my $template = $self->{templates}{'MANIFEST.SKIP'}; return $self->render( $template, \%options ); } =head2 MI_Makefile_PL_guts($main_module, $main_pm_file) This method is called by L and returns text used to populate Makefile.PL when the builder is L; I<$main_pm_file> is the filename of the distribution's main module, I<$main_module>. =cut sub MI_Makefile_PL_guts { ## no critic 'NamingConventions::Capitalization' my ( $self, $main_module, $main_pm_file ) = @_; my %options; $options{main_module} = $main_module; $options{main_pm_file} = $main_pm_file; my $template = $self->{templates}{'MI_Makefile.PL'}; return $self->render( $template, \%options ); } =head2 module_guts($module, $rtname) Implements the creation of a C file. =cut sub module_guts { my ( $self, $module, $rtname ) = @_; my %options; $options{module} = $module; $options{rtname} = $rtname; my $template = $self->{templates}{'Module.pm'}; return $self->render( $template, \%options ); } =head2 README_guts($build_instructions) Implements the creation of a C file. =cut sub README_guts { ## no critic 'NamingConventions::Capitalization' my ( $self, $build_instructions ) = @_; my %options; $options{build_instructions} = $build_instructions; my $template = $self->{templates}{'README'}; return $self->render( $template, \%options ); } =head2 perlcriticrc_guts Implements the creation of a C file. =cut sub perlcriticrc_guts { my $self = shift; my %options; my $template = $self->{templates}{perlcriticrc}; return $self->render( $template, \%options ); } =head2 server_pl_guts Implements the creation of a C file. =cut sub server_pl_guts { my $self = shift; my %options; $options{main_module} = $self->{main_module}; my $template = $self->{templates}{'server.pl'}; return $self->render( $template, \%options ); } =head2 t_guts(@modules) Implements the creation of test files. I<@modules> is a list of all the modules in the distribution. =cut sub t_guts { my ( $self, @opts ) = @_; my %options; $options{modules} = [@opts]; $options{modulenames} = []; foreach ( @{ $options{modules} } ) { push @{ $options{module_pm_files} }, $self->_module_to_pm_file($_); } my %t_files; foreach ( grep { /[.]t\z/msx } keys %{ $self->{templates} } ) { my $template = $self->{templates}{$_}; $t_files{$_} = $self->render( $template, \%options ); } return %t_files; } =head2 tmpl_guts Implements the creation of template files. =cut sub tmpl_guts { my ($self) = @_; my %options; # unused in this function. my @dirparts = ( $self->{basedir}, 'share', 'templates' ); my $tdir = File::Spec->catdir(@dirparts); if ( not -d $tdir ) { mkpath($tdir); $self->progress("Created $tdir"); } my @t_files; foreach my $filename ( grep { /[.]html \z/msx } keys %{ $self->{templates} } ) { my $template = $self->{templates}{$filename}; my $fname = File::Spec->catfile( @dirparts, $filename ); $self->create_file( $fname, $template ); $self->progress("Created $fname"); push @t_files, "share/templates/$filename"; } return @t_files; } =head2 xt_guts(@modules) Implements the creation of test files for author tests. I<@modules> is a list of all the modules in the distribution. =cut sub xt_guts { my ( $self, @opts ) = @_; my %options; $options{modules} = [@opts]; $options{modulenames} = []; foreach ( @{ $options{modules} } ) { push @{ $options{module_pm_files} }, $self->_module_to_pm_file($_); } my %xt_files; foreach ( grep { /[.]xt\z/msx } keys %{ $self->{templates} } ) { my $template = $self->{templates}{$_}; $_ =~ s/[.]xt\z/.t/msx; # change *.xt back to *.t $xt_files{$_} = $self->render( $template, \%options ); } return %xt_files; } =head1 BUGS Please report any bugs or feature requests to C, or through the web interface at L. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. =head1 AUTHOR Jaldhar H. Vyas, Ejaldhar at braincells.comE =head1 COPYRIGHT Copyright (C) 2015, Consolidated Braincells Inc. All Rights Reserved. This distribution is free software; you can redistribute it and/or modify it under the terms of either: 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 version 1.0 or a later version. The full text of the license can be found in the LICENSE file included with this distribution. =head1 SEE ALSO L, L, L, L, L. L, L, L =cut 1; Module-Starter-Plugin-CGIApp-0.44/t000755001750001750 012577474357 17272 5ustar00jaldharjaldhar000000000000Module-Starter-Plugin-CGIApp-0.44/t/01-load.t000444001750001750 43512577474360 20725 0ustar00jaldharjaldhar000000000000#!/usr/bin/perl # Test to see if the module loads correctly. use warnings; use strict; use Test::More tests => 1; BEGIN { use_ok('Module::Starter::Plugin::CGIApp'); } diag( "Testing Module::Starter::Plugin::CGIApp $Module::Starter::Plugin::CGIApp::VERSION, Perl $], $^X" ); Module-Starter-Plugin-CGIApp-0.44/t/module-build.t000444001750001750 16312577474360 22150 0ustar00jaldharjaldhar000000000000#/usr/bin/perl # Test Module::Build support use warnings; use strict; use lib './t'; use common; run_tests 'mb'; Module-Starter-Plugin-CGIApp-0.44/t/extutils-makemaker.t000444001750001750 17412577474360 23404 0ustar00jaldharjaldhar000000000000#!/usr/bin/perl # Test ExtUtils::MakeMaker support use warnings; use strict; use lib './t'; use common; run_tests 'eumm'; Module-Starter-Plugin-CGIApp-0.44/t/00-signature.t000444001750001750 177612577474360 22037 0ustar00jaldharjaldhar000000000000#!/usr/bin/perl # Test if the modules signature is valid. use strict; use Test::More; if (!$ENV{TEST_SIGNATURE}) { plan skip_all => "Set the environment variable TEST_SIGNATURE to enable this test."; } elsif (!eval { require Module::Signature; 1 }) { plan skip_all => "Next time around, consider installing Module::Signature, ". "so you can verify the integrity of this distribution."; } elsif ( !-e 'SIGNATURE' ) { plan skip_all => "SIGNATURE not found"; } elsif ( -s 'SIGNATURE' == 0 ) { plan skip_all => "SIGNATURE file empty"; } elsif (!eval { require Socket; Socket::inet_aton('pool.sks-keyservers.net') }) { plan skip_all => "Cannot connect to the keyserver to check module ". "signature"; } else { plan tests => 1; } my $ret = Module::Signature::verify(); SKIP: { skip "Module::Signature cannot verify", 1 if $ret eq Module::Signature::CANNOT_VERIFY(); cmp_ok $ret, '==', Module::Signature::SIGNATURE_OK(), "Valid signature"; } Module-Starter-Plugin-CGIApp-0.44/t/common.pm000444001750001750 640012577474360 21247 0ustar00jaldharjaldhar000000000000package common; use warnings; use strict; use vars qw(@ISA); @ISA = qw(Exporter); use blib; use Cwd qw( cwd ); use English qw( -no_match_vars ); use File::Copy::Recursive qw( dircopy ); use File::DirCompare; use File::Path qw( mkpath rmtree ); use File::Spec; # this has to go before Module::Starter to affect it use Test::MockTime qw( set_fixed_time restore_time ); use Module::Starter qw( Module::Starter::Plugin::CGIApp ); use Module::Starter::App; use Test::More; use Time::Piece; =head1 NAME common - common functions and variables for this modules tests =head1 VERSION Version 1.4 =cut our $VERSION = '1.4'; our @EXPORT = qw/ run_tests /; sub compare_trees { my ($old, $new, $different, $extra, $missing) = @_; File::DirCompare->compare($old, $new, sub { my ($expected, $got) = @_; if (!$expected) { push @{$extra}, $got; } elsif (!$got) { push @{$missing}, $expected; } else { push @{$different}, $got; } }, { # ignore line endings in file comparisons. cmp => sub { my ($expected, $got) = @_; return File::Compare::compare($expected, $got, sub { my ($line1, $line2) = @_; chomp $line1; chomp $line2; return $line1 ne $line2; }); }, }, ); } sub run_tests { my ($type, $keep) = @_; my %builder = ( mb => 'Module::Build', mi => 'Module::Install', eumm => 'ExtUtils::MakeMaker', ); my $dir = File::Spec->catdir(cwd, 't'); my $old = File::Spec->catdir($dir, 'temp'); my $new = File::Spec->catdir($dir, 'Example-Dist'); if ( -d $old ) { rmtree $old || die "$OS_ERROR\n"; } if ( -d $new ) { rmtree $new || die "$OS_ERROR\n"; } mkpath $old or die "$OS_ERROR\n"; dircopy 't/expected', $old or die "$OS_ERROR\n"; dircopy "t/$type", $old or die "$OS_ERROR\n"; # Standardize the test environment so things like differing time zones and # line endings don't cause false test failures. $ENV{MODULE_STARTER_DIR} = $dir; $ENV{MODULE_TEMPLATE_DIR} = File::Spec->catdir( 'share', 'default' ); $ENV{TZ} = 'UTC'; Time::Piece::_tzset(); # workaround for lack of POSIX::tzset in strawberry set_fixed_time('2010-01-01T00:00:00Z'); Module::Starter->create_distro( distro => 'Example-Dist', modules => [ 'Foo::Bar', 'Foo::Baz' ], dir => $new, author => 'Jaldhar H. Vyas', email => 'jaldhar@braincells.com', builder => $builder{$type}, ); restore_time(); my (@different, @extra, @missing); plan tests => 3; compare_trees($old, $new, \@different, \@extra, \@missing); is(scalar @different, 0, 'different files') || diag join "\n", @different; is(scalar @extra, 0, 'extra files') || diag join "\n", @extra; is(scalar @missing, 0, 'missing files') || diag join "\n", @missing; if ( -d $old && !defined $keep) { rmtree $old || die "$OS_ERROR\n"; } if ( -d $new && !defined $keep) { rmtree $new || die "$OS_ERROR\n"; } return; } 1; Module-Starter-Plugin-CGIApp-0.44/t/module-install.t000444001750001750 16612577474360 22522 0ustar00jaldharjaldhar000000000000#!/usr/bin/perl # Test Module::Install Support use warnings; use strict; use lib './t'; use common; run_tests 'mi'; Module-Starter-Plugin-CGIApp-0.44/t/eumm000755001750001750 012577474360 20227 5ustar00jaldharjaldhar000000000000Module-Starter-Plugin-CGIApp-0.44/t/eumm/README000444001750001750 475412577474360 21256 0ustar00jaldharjaldhar000000000000Example-Dist The README is used to introduce the module and provide instructions on how to install the module, any machine dependencies it may have (for example C compilers and installed libraries) and any other information that should be provided before the module is installed. A README file is required for CPAN modules since CPAN extracts the README file from a module distribution so that people browsing the archive can use it get an idea of the modules uses. It is usually a good idea to provide version information here so that people can decide whether fixes for the module are worth downloading. INSTALLATION To install this module, run the following commands: perl Makefile.PL make make test make install DEPENDENCIES This module requires these other modules: CGI::Application 4.04 File::ShareDir HTML::Template If you want to use the development server (server.pl) you will also need: CGI::Application::Server At build time you will need the above modules plus the following if you want to run the tests: Test::More Test::WWW::Mechanize::CGIApp The signature can be tested by installing the following module: Module::Signature and setting the environment variable TEST_SIGNATURE to 1. Further tests are enabled by setting the environment variable RELEASE_TESTING to 1 and installing the following modules: Perl::Critic 1.098 Pod::Coverage 0.18 Pod::Simple 3.07 Test::Perl::Critic 1.01 Test::Pod 1.26 Test::Pod::Coverage 1.08 They are all available on CPAN (http://www.cpan.org) SUPPORT AND DOCUMENTATION After installing, you can find documentation for this module with the perldoc command. perldoc Foo::Bar You can also look for information at: Search CPAN http://search.cpan.org/dist/Example-Dist CPAN Request Tracker: http://rt.cpan.org/NoAuth/Bugs.html?Dist=Example-Dist AnnoCPAN, annotated CPAN documentation: http://annocpan.org/dist/Example-Dist CPAN Ratings: http://cpanratings.perl.org/d/Example-Dist LICENSE AND COPYRIGHT Copyright (C) 2010, Jaldhar H. Vyas. All rights reserved. This distribution is free software; you can redistribute it and/or modify it under the terms of either: 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 version 1.0 or a later version. The full text of the license can be found in the LICENSE file included with this distribution. Module-Starter-Plugin-CGIApp-0.44/t/eumm/Makefile.PL000444001750001750 130512577474360 22335 0ustar00jaldharjaldhar000000000000use 5.006; use strict; use warnings; use ExtUtils::MakeMaker; WriteMakefile( NAME => 'Example-Dist', VERSION_FROM => 'lib/Foo/Bar.pm', ABSTRACT_FROM => 'lib/Foo/Bar.pm', AUTHOR => 'Jaldhar H. Vyas ', LICENSE => 'perl', PL_FILES => {}, PREREQ_PM => { 'CGI::Application' => 4.04, 'HTML::Template' => 0, 'Test::More' => 0, 'Test::WWW::Mechanize::CGIApp' => 0, }, SIGN => 1, dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', }, clean => { FILES => 'Example-Dist-*' }, ); Module-Starter-Plugin-CGIApp-0.44/t/eumm/MANIFEST000444001750001750 42412577474360 21475 0ustar00jaldharjaldhar000000000000Changes LICENSE MANIFEST MANIFEST.SKIP Makefile.PL README lib/Foo/Bar.pm lib/Foo/Baz.pm server.pl share/templates/runmode1.html t/00-signature.t t/01-load.t t/boilerplate.t t/test-app.t t/www/PUT.STATIC.CONTENT.HERE xt/perl-critic.t xt/perlcriticrc xt/pod-coverage.t xt/pod.t Module-Starter-Plugin-CGIApp-0.44/t/eumm/t000755001750001750 012577474360 20472 5ustar00jaldharjaldhar000000000000Module-Starter-Plugin-CGIApp-0.44/t/eumm/t/boilerplate.t000444001750001750 336312577474360 23323 0ustar00jaldharjaldhar000000000000#!/usr/bin/perl # Some tests to make sure you are not using default placeholders from the # templates. Remove this file after you have customized the distribution. use strict; use warnings; use English qw( -no_match_vars ); use Test::More tests => 4 + 2; sub not_in_file_ok { my ( $filename, %regex ) = @_; open my $fh, '<', $filename or die "couldn't open $filename for reading: $ERRNO"; my %violated; while ( my $line = <$fh> ) { while ( my ( $desc, $regex ) = each %regex ) { if ( $line =~ $regex ) { push @{ $violated{$desc} ||= [] }, $NR; } } } close $fh or die "Close failed: $ERRNO"; if (%violated) { fail("$filename contains boilerplate text"); for ( keys %violated ) { diag "$_ appears on lines @{$violated{$_}}"; } } else { pass("$filename contains no boilerplate text"); } return; } sub module_boilerplate_ok { my ($module) = @_; not_in_file_ok( $module => 'the great new $MODULENAME' => qr/\Q - The great new \E/msx, 'boilerplate description' => qr/\QQuick summary of what the module\E/msx, 'stub function definition' => qr/function[12]/msx, ); return; } not_in_file_ok( 'Makefile.PL' => 'Abstract' => qr/\QAbstract goes here.\E/msx, ); not_in_file_ok( LICENSE => 'License terms' => qr/\QInsert license text here.\E/msx, ); not_in_file_ok( README => 'The README is used...' => qr/\QThe README is used\E/msx, "'version information here'" => qr/\Qto provide version information\E/msx, ); not_in_file_ok( Changes => 'placeholder date/time' => qr{Date/time}msx ); module_boilerplate_ok('lib/Foo/Bar.pm'); module_boilerplate_ok('lib/Foo/Baz.pm'); Module-Starter-Plugin-CGIApp-0.44/t/mi000755001750001750 012577474360 17671 5ustar00jaldharjaldhar000000000000Module-Starter-Plugin-CGIApp-0.44/t/mi/README000444001750001750 475412577474360 20720 0ustar00jaldharjaldhar000000000000Example-Dist The README is used to introduce the module and provide instructions on how to install the module, any machine dependencies it may have (for example C compilers and installed libraries) and any other information that should be provided before the module is installed. A README file is required for CPAN modules since CPAN extracts the README file from a module distribution so that people browsing the archive can use it get an idea of the modules uses. It is usually a good idea to provide version information here so that people can decide whether fixes for the module are worth downloading. INSTALLATION To install this module, run the following commands: perl Makefile.PL make make test make install DEPENDENCIES This module requires these other modules: CGI::Application 4.04 File::ShareDir HTML::Template If you want to use the development server (server.pl) you will also need: CGI::Application::Server At build time you will need the above modules plus the following if you want to run the tests: Test::More Test::WWW::Mechanize::CGIApp The signature can be tested by installing the following module: Module::Signature and setting the environment variable TEST_SIGNATURE to 1. Further tests are enabled by setting the environment variable RELEASE_TESTING to 1 and installing the following modules: Perl::Critic 1.098 Pod::Coverage 0.18 Pod::Simple 3.07 Test::Perl::Critic 1.01 Test::Pod 1.26 Test::Pod::Coverage 1.08 They are all available on CPAN (http://www.cpan.org) SUPPORT AND DOCUMENTATION After installing, you can find documentation for this module with the perldoc command. perldoc Foo::Bar You can also look for information at: Search CPAN http://search.cpan.org/dist/Example-Dist CPAN Request Tracker: http://rt.cpan.org/NoAuth/Bugs.html?Dist=Example-Dist AnnoCPAN, annotated CPAN documentation: http://annocpan.org/dist/Example-Dist CPAN Ratings: http://cpanratings.perl.org/d/Example-Dist LICENSE AND COPYRIGHT Copyright (C) 2010, Jaldhar H. Vyas. All rights reserved. This distribution is free software; you can redistribute it and/or modify it under the terms of either: 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 version 1.0 or a later version. The full text of the license can be found in the LICENSE file included with this distribution. Module-Starter-Plugin-CGIApp-0.44/t/mi/Makefile.PL000444001750001750 65312577474360 21764 0ustar00jaldharjaldhar000000000000use inc::Module::Install; name 'Example-Dist'; all_from 'lib/Foo/Bar.pm'; author 'Jaldhar H. Vyas'; license 'perl'; perl_version '5.008'; build_requires 'Test::More' => 0; build_requires 'Test::WWW::Mechanize::CGIApp' => 0; requires 'CGI::Application' => 4.04; requires 'HTML::Template' => 0; install_share; auto_install; sign 1; WriteAll; Module-Starter-Plugin-CGIApp-0.44/t/mi/MANIFEST000444001750001750 42412577474360 21137 0ustar00jaldharjaldhar000000000000Changes LICENSE MANIFEST MANIFEST.SKIP Makefile.PL README lib/Foo/Bar.pm lib/Foo/Baz.pm server.pl share/templates/runmode1.html t/00-signature.t t/01-load.t t/boilerplate.t t/test-app.t t/www/PUT.STATIC.CONTENT.HERE xt/perl-critic.t xt/perlcriticrc xt/pod-coverage.t xt/pod.t Module-Starter-Plugin-CGIApp-0.44/t/mi/t000755001750001750 012577474360 20134 5ustar00jaldharjaldhar000000000000Module-Starter-Plugin-CGIApp-0.44/t/mi/t/boilerplate.t000444001750001750 336312577474360 22765 0ustar00jaldharjaldhar000000000000#!/usr/bin/perl # Some tests to make sure you are not using default placeholders from the # templates. Remove this file after you have customized the distribution. use strict; use warnings; use English qw( -no_match_vars ); use Test::More tests => 4 + 2; sub not_in_file_ok { my ( $filename, %regex ) = @_; open my $fh, '<', $filename or die "couldn't open $filename for reading: $ERRNO"; my %violated; while ( my $line = <$fh> ) { while ( my ( $desc, $regex ) = each %regex ) { if ( $line =~ $regex ) { push @{ $violated{$desc} ||= [] }, $NR; } } } close $fh or die "Close failed: $ERRNO"; if (%violated) { fail("$filename contains boilerplate text"); for ( keys %violated ) { diag "$_ appears on lines @{$violated{$_}}"; } } else { pass("$filename contains no boilerplate text"); } return; } sub module_boilerplate_ok { my ($module) = @_; not_in_file_ok( $module => 'the great new $MODULENAME' => qr/\Q - The great new \E/msx, 'boilerplate description' => qr/\QQuick summary of what the module\E/msx, 'stub function definition' => qr/function[12]/msx, ); return; } not_in_file_ok( 'Makefile.PL' => 'Abstract' => qr/\QAbstract goes here.\E/msx, ); not_in_file_ok( LICENSE => 'License terms' => qr/\QInsert license text here.\E/msx, ); not_in_file_ok( README => 'The README is used...' => qr/\QThe README is used\E/msx, "'version information here'" => qr/\Qto provide version information\E/msx, ); not_in_file_ok( Changes => 'placeholder date/time' => qr{Date/time}msx ); module_boilerplate_ok('lib/Foo/Bar.pm'); module_boilerplate_ok('lib/Foo/Baz.pm'); Module-Starter-Plugin-CGIApp-0.44/t/mb000755001750001750 012577474360 17662 5ustar00jaldharjaldhar000000000000Module-Starter-Plugin-CGIApp-0.44/t/mb/README000444001750001750 476212577474360 20710 0ustar00jaldharjaldhar000000000000Example-Dist The README is used to introduce the module and provide instructions on how to install the module, any machine dependencies it may have (for example C compilers and installed libraries) and any other information that should be provided before the module is installed. A README file is required for CPAN modules since CPAN extracts the README file from a module distribution so that people browsing the archive can use it get an idea of the modules uses. It is usually a good idea to provide version information here so that people can decide whether fixes for the module are worth downloading. INSTALLATION To install this module, run the following commands: perl Build.PL ./Build ./Build test ./Build install DEPENDENCIES This module requires these other modules: CGI::Application 4.04 File::ShareDir HTML::Template If you want to use the development server (server.pl) you will also need: CGI::Application::Server At build time you will need the above modules plus the following if you want to run the tests: Test::More Test::WWW::Mechanize::CGIApp The signature can be tested by installing the following module: Module::Signature and setting the environment variable TEST_SIGNATURE to 1. Further tests are enabled by setting the environment variable RELEASE_TESTING to 1 and installing the following modules: Perl::Critic 1.098 Pod::Coverage 0.18 Pod::Simple 3.07 Test::Perl::Critic 1.01 Test::Pod 1.26 Test::Pod::Coverage 1.08 They are all available on CPAN (http://www.cpan.org) SUPPORT AND DOCUMENTATION After installing, you can find documentation for this module with the perldoc command. perldoc Foo::Bar You can also look for information at: Search CPAN http://search.cpan.org/dist/Example-Dist CPAN Request Tracker: http://rt.cpan.org/NoAuth/Bugs.html?Dist=Example-Dist AnnoCPAN, annotated CPAN documentation: http://annocpan.org/dist/Example-Dist CPAN Ratings: http://cpanratings.perl.org/d/Example-Dist LICENSE AND COPYRIGHT Copyright (C) 2010, Jaldhar H. Vyas. All rights reserved. This distribution is free software; you can redistribute it and/or modify it under the terms of either: 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 version 1.0 or a later version. The full text of the license can be found in the LICENSE file included with this distribution. Module-Starter-Plugin-CGIApp-0.44/t/mb/Build.PL000444001750001750 153612577474360 21320 0ustar00jaldharjaldhar000000000000use 5.006; use strict; use warnings; use Module::Build; my $builder = Module::Build->new( dist_name => 'Example-Dist', module_name => 'Foo::Bar', dist_abstract => 'Abstract goes here.', dist_author => 'Jaldhar H. Vyas ', license => 'perl', dist_version_from => 'lib/Foo/Bar.pm', share_dir => 'share', build_requires => { 'Test::More' => 0, 'Test::WWW::Mechanize::CGIApp' => 0, }, requires => { 'perl' => 5.006, 'CGI::Application' => 4.04, 'HTML::Template' => 0, }, add_to_cleanup => [ 'Example-Dist-*' ], create_makefile_pl => 'traditional', sign => 1, ); $builder->create_build_script(); Module-Starter-Plugin-CGIApp-0.44/t/mb/MANIFEST000444001750001750 42112577474360 21125 0ustar00jaldharjaldhar000000000000Build.PL Changes LICENSE MANIFEST MANIFEST.SKIP README lib/Foo/Bar.pm lib/Foo/Baz.pm server.pl share/templates/runmode1.html t/00-signature.t t/01-load.t t/boilerplate.t t/test-app.t t/www/PUT.STATIC.CONTENT.HERE xt/perl-critic.t xt/perlcriticrc xt/pod-coverage.t xt/pod.t Module-Starter-Plugin-CGIApp-0.44/t/mb/t000755001750001750 012577474360 20125 5ustar00jaldharjaldhar000000000000Module-Starter-Plugin-CGIApp-0.44/t/mb/t/boilerplate.t000444001750001750 336012577474360 22753 0ustar00jaldharjaldhar000000000000#!/usr/bin/perl # Some tests to make sure you are not using default placeholders from the # templates. Remove this file after you have customized the distribution. use strict; use warnings; use English qw( -no_match_vars ); use Test::More tests => 4 + 2; sub not_in_file_ok { my ( $filename, %regex ) = @_; open my $fh, '<', $filename or die "couldn't open $filename for reading: $ERRNO"; my %violated; while ( my $line = <$fh> ) { while ( my ( $desc, $regex ) = each %regex ) { if ( $line =~ $regex ) { push @{ $violated{$desc} ||= [] }, $NR; } } } close $fh or die "Close failed: $ERRNO"; if (%violated) { fail("$filename contains boilerplate text"); for ( keys %violated ) { diag "$_ appears on lines @{$violated{$_}}"; } } else { pass("$filename contains no boilerplate text"); } return; } sub module_boilerplate_ok { my ($module) = @_; not_in_file_ok( $module => 'the great new $MODULENAME' => qr/\Q - The great new \E/msx, 'boilerplate description' => qr/\QQuick summary of what the module\E/msx, 'stub function definition' => qr/function[12]/msx, ); return; } not_in_file_ok( 'Build.PL' => 'Abstract' => qr/\QAbstract goes here.\E/msx, ); not_in_file_ok( LICENSE => 'License terms' => qr/\QInsert license text here.\E/msx, ); not_in_file_ok( README => 'The README is used...' => qr/\QThe README is used\E/msx, "'version information here'" => qr/\Qto provide version information\E/msx, ); not_in_file_ok( Changes => 'placeholder date/time' => qr{Date/time}msx ); module_boilerplate_ok('lib/Foo/Bar.pm'); module_boilerplate_ok('lib/Foo/Baz.pm'); Module-Starter-Plugin-CGIApp-0.44/t/expected000755001750001750 012577474357 21073 5ustar00jaldharjaldhar000000000000Module-Starter-Plugin-CGIApp-0.44/t/expected/LICENSE000444001750001750 60512577474360 22210 0ustar00jaldharjaldhar000000000000Copyright (C) 2010, Jaldhar H. Vyas. All rights reserved. This distribution is free software; you can redistribute it and/or modify it under the terms of either: 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 version 1.0 or a later version. Insert license text here. Module-Starter-Plugin-CGIApp-0.44/t/expected/MANIFEST.SKIP000444001750001750 13612577474360 23100 0ustar00jaldharjaldhar000000000000#defaults ^Makefile$ ^blib/ ^pm_to_blib ^blibdirs ^Build$ ^Build.bat$ ^_build/ .git .svn .tmp Module-Starter-Plugin-CGIApp-0.44/t/expected/Changes000444001750001750 17712577474360 22502 0ustar00jaldharjaldhar000000000000Revision history for Example-Dist 0.01 Fri Jan 1 00:00:00 2010 First version, released on an unsuspecting world. Module-Starter-Plugin-CGIApp-0.44/t/expected/server.pl000444001750001750 51112577474360 23042 0ustar00jaldharjaldhar000000000000use warnings; use strict; use CGI::Application::Server; use lib 'lib'; use Foo::Bar; my $app = Foo::Bar->new( TMPL_PATH => './share/templates', PARAMS => { }, ); my $server = CGI::Application::Server->new(); $server->document_root('./t/www'); $server->entry_points({ '/index.cgi' => $app, }); $server->run; Module-Starter-Plugin-CGIApp-0.44/t/expected/lib000755001750001750 012577474360 21633 5ustar00jaldharjaldhar000000000000Module-Starter-Plugin-CGIApp-0.44/t/expected/lib/Foo000755001750001750 012577474360 22356 5ustar00jaldharjaldhar000000000000Module-Starter-Plugin-CGIApp-0.44/t/expected/lib/Foo/Baz.pm000444001750001750 602212577474360 23565 0ustar00jaldharjaldhar000000000000 =head1 NAME Foo::Baz - The great new Foo::Baz web application! =head1 SYNOPSIS use Foo::Baz; my $app = Foo::Baz->new(); $app->run(); =head1 ABSTRACT A brief summary of what Foo::Baz does. =cut package Foo::Baz; use warnings; use strict; use base 'CGI::Application'; use Carp qw( croak ); use File::ShareDir qw( dist_dir ); use File::Spec qw (); =head1 VERSION This document describes Foo::Baz Version 0.01 =cut our $VERSION = '0.01'; =head1 DESCRIPTION Overview of functionality and purpose of web application module Foo::Baz... =head1 METHODS =head2 SUBCLASSED METHODS =head3 setup Sets up the run mode dispatch table and the start, error, and default run modes. If the template path is not set, sets it to a default value. TODO: change all these values to ones more appropriate for your application. =cut sub setup { my ($self) = @_; $self->start_mode('runmode1'); $self->error_mode('runmode1'); $self->run_modes( [qw/ runmode1 /] ); if ( !$self->tmpl_path ) { $self->tmpl_path( File::Spec->catdir( dist_dir('Example-Dist'), 'templates' ) ); } $self->run_modes( AUTOLOAD => 'runmode1' ); return; } =pod TODO: Other methods inherited from CGI::Application go here. =head2 RUN MODES =head3 runmode1 * Purpose * Expected parameters * Function on success * Function on failure TODO: Describe runmode1 here. Rename runmode1 to something more appropriate for your application. =cut sub runmode1 { my ($self) = @_; my $template = $self->load_tmpl; $template->param( message => 'Hello world!' ); return $template->output; } =head2 OTHER METHODS =head3 function1 TODO: Describe function1 here. Rename function1 to something more appropriate for your application. =cut sub function1 { my ($self) = @_; return 1; } =pod TODO: Other methods in your public interface go here. =cut # TODO: Private methods go here. Start their names with an _ so they are skipped # by Pod::Coverage. =head1 BUGS AND LIMITATIONS There are no known problems with this module. Please report any bugs or feature requests to C, or through the web interface at L. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. =head1 SEE ALSO L =head1 THANKS List acknowledgements here or delete this section. =head1 AUTHOR Jaldhar H. Vyas, C<< >> =head1 LICENSE AND COPYRIGHT Copyright (C) 2010, Jaldhar H. Vyas. All rights reserved. This distribution is free software; you can redistribute it and/or modify it under the terms of either: 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 version 1.0 or a later version. The full text of the license can be found in the LICENSE file included with this distribution. =cut 1; # End of Foo::Baz __END__ Module-Starter-Plugin-CGIApp-0.44/t/expected/lib/Foo/Bar.pm000444001750001750 602212577474360 23555 0ustar00jaldharjaldhar000000000000 =head1 NAME Foo::Bar - The great new Foo::Bar web application! =head1 SYNOPSIS use Foo::Bar; my $app = Foo::Bar->new(); $app->run(); =head1 ABSTRACT A brief summary of what Foo::Bar does. =cut package Foo::Bar; use warnings; use strict; use base 'CGI::Application'; use Carp qw( croak ); use File::ShareDir qw( dist_dir ); use File::Spec qw (); =head1 VERSION This document describes Foo::Bar Version 0.01 =cut our $VERSION = '0.01'; =head1 DESCRIPTION Overview of functionality and purpose of web application module Foo::Bar... =head1 METHODS =head2 SUBCLASSED METHODS =head3 setup Sets up the run mode dispatch table and the start, error, and default run modes. If the template path is not set, sets it to a default value. TODO: change all these values to ones more appropriate for your application. =cut sub setup { my ($self) = @_; $self->start_mode('runmode1'); $self->error_mode('runmode1'); $self->run_modes( [qw/ runmode1 /] ); if ( !$self->tmpl_path ) { $self->tmpl_path( File::Spec->catdir( dist_dir('Example-Dist'), 'templates' ) ); } $self->run_modes( AUTOLOAD => 'runmode1' ); return; } =pod TODO: Other methods inherited from CGI::Application go here. =head2 RUN MODES =head3 runmode1 * Purpose * Expected parameters * Function on success * Function on failure TODO: Describe runmode1 here. Rename runmode1 to something more appropriate for your application. =cut sub runmode1 { my ($self) = @_; my $template = $self->load_tmpl; $template->param( message => 'Hello world!' ); return $template->output; } =head2 OTHER METHODS =head3 function1 TODO: Describe function1 here. Rename function1 to something more appropriate for your application. =cut sub function1 { my ($self) = @_; return 1; } =pod TODO: Other methods in your public interface go here. =cut # TODO: Private methods go here. Start their names with an _ so they are skipped # by Pod::Coverage. =head1 BUGS AND LIMITATIONS There are no known problems with this module. Please report any bugs or feature requests to C, or through the web interface at L. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. =head1 SEE ALSO L =head1 THANKS List acknowledgements here or delete this section. =head1 AUTHOR Jaldhar H. Vyas, C<< >> =head1 LICENSE AND COPYRIGHT Copyright (C) 2010, Jaldhar H. Vyas. All rights reserved. This distribution is free software; you can redistribute it and/or modify it under the terms of either: 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 version 1.0 or a later version. The full text of the license can be found in the LICENSE file included with this distribution. =cut 1; # End of Foo::Bar __END__ Module-Starter-Plugin-CGIApp-0.44/t/expected/t000755001750001750 012577474357 21336 5ustar00jaldharjaldhar000000000000Module-Starter-Plugin-CGIApp-0.44/t/expected/t/01-load.t000444001750001750 46412577474360 22773 0ustar00jaldharjaldhar000000000000#!/usr/bin/perl # Test to see if the module loads correctly. use warnings; use strict; use Test::More tests => 2; BEGIN { use_ok('Foo::Bar'); use_ok('Foo::Baz'); } diag( "Testing Foo::Bar $Foo::Bar::VERSION, Perl $], $^X\n", "Testing Foo::Baz $Foo::Baz::VERSION, Perl $], $^X\n", ); Module-Starter-Plugin-CGIApp-0.44/t/expected/t/test-app.t000444001750001750 51312577474357 23374 0ustar00jaldharjaldhar000000000000#!/usr/bin/perl # Test application functionality use strict; use warnings; use Test::More tests => 1; use Test::WWW::Mechanize::CGIApp; use Foo::Bar; my $mech = Test::WWW::Mechanize::CGIApp->new; $mech->app( sub { my $app = Foo::Bar->new(PARAMS => { }); $app->run(); } ); $mech->get_ok(q{/}); Module-Starter-Plugin-CGIApp-0.44/t/expected/t/00-signature.t000444001750001750 176312577474360 24077 0ustar00jaldharjaldhar000000000000#!/usr/bin/perl # Test if the modules signature is valid. use warnings; use strict; use Test::More; if ( !$ENV{TEST_SIGNATURE} ) { plan skip_all => 'Set the environment variable TEST_SIGNATURE to enable this test.'; } elsif ( !eval { require Module::Signature; 1 } ) { plan skip_all => 'Next time around, consider install Module::Signature, ' . 'so you can verify the integrity of this distribution.'; } elsif ( !-e 'SIGNATURE' ) { plan skip_all => 'SIGNATURE not found'; } elsif ( -s 'SIGNATURE' == 0 ) { plan skip_all => 'SIGNATURE file empty'; } elsif ( !eval { require Socket; Socket::inet_aton('pool.sks-keyservers.net') } ) { plan skip_all => 'Cannot connect to the keyserver to check module signature'; } else { plan tests => 1; } my $ret = Module::Signature::verify(); SKIP: { skip 'Module::Signature cannot verify', 1 if $ret eq Module::Signature::CANNOT_VERIFY(); cmp_ok $ret, '==', Module::Signature::SIGNATURE_OK(), 'Valid signature'; } Module-Starter-Plugin-CGIApp-0.44/t/expected/t/www000755001750001750 012577474357 22162 5ustar00jaldharjaldhar000000000000Module-Starter-Plugin-CGIApp-0.44/t/expected/t/www/PUT.STATIC.CONTENT.HERE000444001750001750 112577474357 25442 0ustar00jaldharjaldhar000000000000 Module-Starter-Plugin-CGIApp-0.44/t/expected/xt000755001750001750 012577474360 21520 5ustar00jaldharjaldhar000000000000Module-Starter-Plugin-CGIApp-0.44/t/expected/xt/perl-critic.t000444001750001750 105312577474360 24256 0ustar00jaldharjaldhar000000000000#!/usr/bin/perl # Test that the module passes perlcritic use Test::More; use strict; BEGIN { $| = 1; $^W = 1; } use File::Find; my @MODULES = ( 'Perl::Critic 1.098', "Test::Perl::Critic 1.01 (-profile => 'xt/perlcriticrc')", ); # Load the testing modules foreach my $MODULE ( @MODULES ) { eval "use $MODULE"; if ( $@ ) { plan( skip_all => "$MODULE not available for testing" ); } } my @files = qw{ lib/Foo/Bar.pm lib/Foo/Baz.pm }; foreach my $file (@files) { critic_ok($file); } done_testing(scalar @files); 1; Module-Starter-Plugin-CGIApp-0.44/t/expected/xt/pod.t000444001750001750 57112577474360 22607 0ustar00jaldharjaldhar000000000000#!/usr/bin/perl # Test that the syntax of our POD documentation is valid use Test::More; use strict; BEGIN { $| = 1; $^W = 1; } my @MODULES = ( 'Pod::Simple 3.07', 'Test::Pod 1.26', ); # Load the testing modules foreach my $MODULE ( @MODULES ) { eval "use $MODULE"; if ( $@ ) { plan( skip_all => "$MODULE not available for testing" ); } } all_pod_files_ok(); 1; Module-Starter-Plugin-CGIApp-0.44/t/expected/xt/pod-coverage.t000444001750001750 57212577474360 24401 0ustar00jaldharjaldhar000000000000#!/usr/bin/perl # Ensure pod coverage in your distribution use Test::More; use strict; BEGIN { $| = 1; $^W = 1; } my @MODULES = ( 'Pod::Coverage 0.18', 'Test::Pod::Coverage 1.08', ); # Load the testing modules foreach my $MODULE ( @MODULES ) { eval "use $MODULE"; if ( $@ ) { plan( skip_all => "$MODULE not available for testing" ); } } all_pod_coverage_ok(); 1; Module-Starter-Plugin-CGIApp-0.44/t/expected/xt/perlcriticrc000444001750001750 23612577474360 24246 0ustar00jaldharjaldhar000000000000severity = brutal [-Documentation::RequirePodAtEnd] [-Documentation::RequirePodSections] [-Documentation::PodSpelling] [-Miscellanea::RequireRcsKeywords] Module-Starter-Plugin-CGIApp-0.44/t/expected/share000755001750001750 012577474360 22167 5ustar00jaldharjaldhar000000000000Module-Starter-Plugin-CGIApp-0.44/t/expected/share/templates000755001750001750 012577474360 24165 5ustar00jaldharjaldhar000000000000Module-Starter-Plugin-CGIApp-0.44/t/expected/share/templates/runmode1.html000444001750001750 36412577474360 26725 0ustar00jaldharjaldhar000000000000 <!-- TMPL_VAR message -->

Module-Starter-Plugin-CGIApp-0.44/xt000755001750001750 012577474360 17454 5ustar00jaldharjaldhar000000000000Module-Starter-Plugin-CGIApp-0.44/xt/perl-critic.t000444001750001750 110412577474360 22207 0ustar00jaldharjaldhar000000000000#!/usr/bin/perl # Test that the module passes perlcritic use Test::More; use strict; BEGIN { $| = 1; $^W = 1; } my @MODULES = ( 'Perl::Critic 1.098', "Test::Perl::Critic 1.01 (-profile => 'xt/perlcriticrc')", ); # Load the testing modules foreach my $MODULE ( @MODULES ) { eval "use $MODULE"; if ( $@ ) { plan( skip_all => "$MODULE not available for testing" ); } } my @files = qw{ lib/Module/Starter/Plugin/CGIApp.pm script/cgiapp-starter script/titanium-starter }; foreach my $file (@files) { critic_ok($file); } done_testing(scalar @files); 1; Module-Starter-Plugin-CGIApp-0.44/xt/distmanifest.t000444001750001750 53612577474360 22454 0ustar00jaldharjaldhar000000000000#!/usr/bin/perl # Test that the module MANIFEST is up-to-date use Test::More; use strict; BEGIN { $| = 1; $^W = 1; } my @MODULES = ( 'Test::DistManifest 1.003', ); # Load the testing modules foreach my $MODULE ( @MODULES ) { eval "use $MODULE"; if ( $@ ) { plan( skip_all => "$MODULE not available for testing" ); } } manifest_ok(); 1; Module-Starter-Plugin-CGIApp-0.44/xt/pod.t000444001750001750 57112577474360 20543 0ustar00jaldharjaldhar000000000000#!/usr/bin/perl # Test that the syntax of our POD documentation is valid use Test::More; use strict; BEGIN { $| = 1; $^W = 1; } my @MODULES = ( 'Pod::Simple 3.07', 'Test::Pod 1.26', ); # Load the testing modules foreach my $MODULE ( @MODULES ) { eval "use $MODULE"; if ( $@ ) { plan( skip_all => "$MODULE not available for testing" ); } } all_pod_files_ok(); 1; Module-Starter-Plugin-CGIApp-0.44/xt/meta.t000444001750001750 54612577474360 20711 0ustar00jaldharjaldhar000000000000#!/usr/bin/perl # Test that our META.yml file matches the specification use Test::More; use strict; BEGIN { $| = 1; $^W = 1; } my @MODULES = ( 'Test::CPAN::Meta 0.12', ); # Load the testing modules foreach my $MODULE ( @MODULES ) { eval "use $MODULE"; if ( $@ ) { plan( skip_all => "$MODULE not available for testing" ); } } meta_yaml_ok(); 1; Module-Starter-Plugin-CGIApp-0.44/xt/hasversion.t000444001750001750 54212577474360 22140 0ustar00jaldharjaldhar000000000000#!/usr/bin/perl # Test that all modules have a version number use Test::More; use strict; BEGIN { $| = 1; $^W = 1; } my @MODULES = ( 'Test::HasVersion 0.012', ); # Load the testing modules foreach my $MODULE ( @MODULES ) { eval "use $MODULE"; if ( $@ ) { plan( skip_all => "$MODULE not available for testing" ); } } all_pm_version_ok(); 1; Module-Starter-Plugin-CGIApp-0.44/xt/pod-coverage.t000444001750001750 57212577474360 22335 0ustar00jaldharjaldhar000000000000#!/usr/bin/perl # Ensure pod coverage in your distribution use Test::More; use strict; BEGIN { $| = 1; $^W = 1; } my @MODULES = ( 'Pod::Coverage 0.18', 'Test::Pod::Coverage 1.08', ); # Load the testing modules foreach my $MODULE ( @MODULES ) { eval "use $MODULE"; if ( $@ ) { plan( skip_all => "$MODULE not available for testing" ); } } all_pod_coverage_ok(); 1; Module-Starter-Plugin-CGIApp-0.44/xt/minimumversion.t000444001750001750 65112577474360 23041 0ustar00jaldharjaldhar000000000000#!/usr/bin/perl # Test that our declared minimum Perl version matches our syntax use Test::More; use strict; BEGIN { $| = 1; $^W = 1; } my @MODULES = ( 'Perl::MinimumVersion 1.20', 'Test::MinimumVersion 0.008', ); # Load the testing modules foreach my $MODULE ( @MODULES ) { eval "use $MODULE"; if ( $@ ) { plan( skip_all => "$MODULE not available for testing" ); } } all_minimum_version_from_metayml_ok(); 1; Module-Starter-Plugin-CGIApp-0.44/xt/kwalitee.t000444001750001750 72612577474360 21570 0ustar00jaldharjaldhar000000000000#!/usr/bin/perl # Check distribution for Kwalitee use Test::More; use strict; BEGIN { $| = 1; $^W = 1; } my @MODULES = ( 'Test::Kwalitee tests => [ qw( -has_test_pod -has_test_pod_coverage ) ]', ); # Load the testing modules foreach my $MODULE ( @MODULES ) { eval "use $MODULE"; if ( $@ ) { plan( skip_all => "$MODULE not available for testing" ); } } END { if ( -f 'Debian_CPANTS.txt') { unlink 'Debian_CPANTS.txt' or die "$!\n"; } } 1; Module-Starter-Plugin-CGIApp-0.44/xt/perlcriticrc000444001750001750 23612577474360 22202 0ustar00jaldharjaldhar000000000000severity = brutal [-Documentation::RequirePodAtEnd] [-Documentation::RequirePodSections] [-Documentation::PodSpelling] [-Miscellanea::RequireRcsKeywords] Module-Starter-Plugin-CGIApp-0.44/share000755001750001750 012577474357 20131 5ustar00jaldharjaldhar000000000000Module-Starter-Plugin-CGIApp-0.44/share/titanium000755001750001750 012577474357 21763 5ustar00jaldharjaldhar000000000000Module-Starter-Plugin-CGIApp-0.44/share/titanium/01-load.t000444001750001750 53612577474360 23420 0ustar00jaldharjaldhar000000000000#!/usr/bin/perl # Test to see if the module loads correctly. use warnings; use strict; use Test::More tests => ; BEGIN { use_ok(''); } diag( "Testing $::VERSION, Perl $], $^X\n", ); Module-Starter-Plugin-CGIApp-0.44/share/titanium/runmode1.html000444001750001750 36412577474360 24515 0ustar00jaldharjaldhar000000000000 <!-- TMPL_VAR message -->

Module-Starter-Plugin-CGIApp-0.44/share/titanium/Module.pm000444001750001750 551612577474360 23704 0ustar00jaldharjaldhar000000000000 =head1 NAME - The great new web application! =head1 SYNOPSIS use ; my $app = ->new(); $app->run(); =head1 ABSTRACT A brief summary of what does. =cut package ; use warnings; use strict; use base 'Titanium'; use Carp qw( croak ); use File::ShareDir qw( dist_dir ); use File::Spec qw (); =head1 VERSION This document describes Version 0.01 =cut our $VERSION = '0.01'; =head1 DESCRIPTION Overview of functionality and purpose of web application module ... =head1 METHODS =head2 SUBCLASSED METHODS =head3 setup Sets up the run mode dispatch table and the start, error, and default run modes. If the template path is not set, sets it to a default value. TODO: change all these values to ones more appropriate for your application. =cut sub setup { my ($self) = @_; $self->start_mode('runmode1'); $self->error_mode('runmode1'); $self->run_modes( [qw/ runmode1 /] ); if ( !$self->tmpl_path ) { $self->tmpl_path( File::Spec->catdir( dist_dir(''), 'templates' ) ); } $self->run_modes( AUTOLOAD => 'runmode1' ); return; } =pod TODO: Other methods inherited from Titanium go here. =head2 RUN MODES =head3 runmode1 * Purpose * Expected parameters * Function on success * Function on failure TODO: Describe runmode1 here. Rename runmode1 to something more appropriate for your application. =cut sub runmode1 { my ($self) = @_; my $template = $self->load_tmpl; $template->param( message => 'Hello world!' ); return $template->output; } =head2 OTHER METHODS =head3 function1 TODO: Describe function1 here. Rename function1 to something more appropriate for your application. =cut sub function1 { my ($self) = @_; return 1; } =pod TODO: Other methods in your public interface go here. =cut # TODO: Private methods go here. Start their names with an _ so they are skipped # by Pod::Coverage. =head1 BUGS AND LIMITATIONS There are no known problems with this module. Please report any bugs or feature requests to C at rt.cpan.org>, or through the web interface at L>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. =head1 SEE ALSO L =head1 THANKS List acknowledgements here or delete this section. =head1 AUTHOR , C<< <> >> =head1 LICENSE AND COPYRIGHT Copyright (C) , . All rights reserved. The full text of the license can be found in the LICENSE file included with this distribution. =cut 1; # End of __END__ Module-Starter-Plugin-CGIApp-0.44/share/titanium/LICENSE000444001750001750 17512577474360 23102 0ustar00jaldharjaldhar000000000000Copyright (C) , . All rights reserved. Insert license text here. Module-Starter-Plugin-CGIApp-0.44/share/titanium/README000444001750001750 426312577474360 22777 0ustar00jaldharjaldhar000000000000 The README is used to introduce the module and provide instructions on how to install the module, any machine dependencies it may have (for example C compilers and installed libraries) and any other information that should be provided before the module is installed. A README file is required for CPAN modules since CPAN extracts the README file from a module distribution so that people browsing the archive can use it get an idea of the modules uses. It is usually a good idea to provide version information here so that people can decide whether fixes for the module are worth downloading. INSTALLATION DEPENDENCIES This module requires these other modules: Titanium File::ShareDir HTML::Template If you want to use the development server (server.pl) you will also need: CGI::Application::Server At build time you will need the above modules plus the following if you want to run the tests: Test::More Test::WWW::Mechanize::CGIApp The signature can be tested by installing the following module: Module::Signature and setting the environment variable TEST_SIGNATURE to 1. Further tests are enabled by setting the environment variable RELEASE_TESTING to 1 and installing the following modules: Perl::Critic 1.098 Pod::Coverage 0.18 Pod::Simple 3.07 Test::Perl::Critic 1.01 Test::Pod 1.26 Test::Pod::Coverage 1.08 They are all available on CPAN (http://www.cpan.org) SUPPORT AND DOCUMENTATION After installing, you can find documentation for this module with the perldoc command. perldoc You can also look for information at: Search CPAN http://search.cpan.org/dist/ CPAN Request Tracker: http://rt.cpan.org/NoAuth/Bugs.html?Dist= AnnoCPAN, annotated CPAN documentation: http://annocpan.org/dist/ CPAN Ratings: http://cpanratings.perl.org/d/ LICENSE AND COPYRIGHT Copyright (C) , . All rights reserved. The full text of the license can be found in the LICENSE file included with this distribution. Module-Starter-Plugin-CGIApp-0.44/share/titanium/Build.PL000444001750001750 160612577474360 23411 0ustar00jaldharjaldhar000000000000use 5.006; use strict; use warnings; use Module::Build; my $builder = Module::Build->new( dist_name => '', module_name => '', dist_abstract => 'Abstract goes here.', dist_author => ' <>', license => '', dist_version_from => '', share_dir => 'share', build_requires => { 'Test::More' => 0, 'Test::WWW::Mechanize::CGIApp' => 0, }, requires => { 'perl' => 5.006, 'Titanium' => 0, 'HTML::Template' => 0, }, add_to_cleanup => [ '-*' ], create_makefile_pl => 'traditional', sign => 1, ); $builder->create_build_script(); Module-Starter-Plugin-CGIApp-0.44/share/titanium/pod-coverage.xt000444001750001750 57212577474360 25026 0ustar00jaldharjaldhar000000000000#!/usr/bin/perl # Ensure pod coverage in your distribution use Test::More; use strict; BEGIN { $| = 1; $^W = 1; } my @MODULES = ( 'Pod::Coverage 0.18', 'Test::Pod::Coverage 1.08', ); # Load the testing modules foreach my $MODULE ( @MODULES ) { eval "use $MODULE"; if ( $@ ) { plan( skip_all => "$MODULE not available for testing" ); } } all_pod_coverage_ok(); 1; Module-Starter-Plugin-CGIApp-0.44/share/titanium/MI_Makefile.PL000444001750001750 70612577474360 24434 0ustar00jaldharjaldhar000000000000use inc::Module::Install; name ''; all_from ''; author ''; license ''; perl_version '5.008'; build_requires 'Test::More' => 0; build_requires 'Test::WWW::Mechanize::CGIApp' => 0; requires 'Titanium' => 0; requires 'HTML::Template' => 0; install_share; auto_install; sign 1; WriteAll; Module-Starter-Plugin-CGIApp-0.44/share/titanium/Makefile.PL000444001750001750 135012577474360 24063 0ustar00jaldharjaldhar000000000000use 5.006; use strict; use warnings; use ExtUtils::MakeMaker; WriteMakefile( NAME => '', VERSION_FROM => '', ABSTRACT_FROM => '', AUTHOR => ' <>', LICENSE => '', PL_FILES => {}, PREREQ_PM => { 'Titanium' => 0, 'HTML::Template' => 0, 'Test::More' => 0, 'Test::WWW::Mechanize::CGIApp' => 0, }, SIGN => 1, dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', }, clean => { FILES => '-*' }, ); Module-Starter-Plugin-CGIApp-0.44/share/titanium/MANIFEST.SKIP000444001750001750 13612577474360 23770 0ustar00jaldharjaldhar000000000000#defaults ^Makefile$ ^blib/ ^pm_to_blib ^blibdirs ^Build$ ^Build.bat$ ^_build/ .git .svn .tmp Module-Starter-Plugin-CGIApp-0.44/share/titanium/test-app.t000444001750001750 54712577474357 24030 0ustar00jaldharjaldhar000000000000#!/usr/bin/perl # Test application functionality use strict; use warnings; use Test::More tests => 1; use Test::WWW::Mechanize::CGIApp; use ; my $mech = Test::WWW::Mechanize::CGIApp->new; $mech->app( sub { my $app = ->new(PARAMS => { }); $app->run(); } ); $mech->get_ok(q{/}); Module-Starter-Plugin-CGIApp-0.44/share/titanium/00-signature.t000444001750001750 176312577474360 24524 0ustar00jaldharjaldhar000000000000#!/usr/bin/perl # Test if the modules signature is valid. use warnings; use strict; use Test::More; if ( !$ENV{TEST_SIGNATURE} ) { plan skip_all => 'Set the environment variable TEST_SIGNATURE to enable this test.'; } elsif ( !eval { require Module::Signature; 1 } ) { plan skip_all => 'Next time around, consider install Module::Signature, ' . 'so you can verify the integrity of this distribution.'; } elsif ( !-e 'SIGNATURE' ) { plan skip_all => 'SIGNATURE not found'; } elsif ( -s 'SIGNATURE' == 0 ) { plan skip_all => 'SIGNATURE file empty'; } elsif ( !eval { require Socket; Socket::inet_aton('pool.sks-keyservers.net') } ) { plan skip_all => 'Cannot connect to the keyserver to check module signature'; } else { plan tests => 1; } my $ret = Module::Signature::verify(); SKIP: { skip 'Module::Signature cannot verify', 1 if $ret eq Module::Signature::CANNOT_VERIFY(); cmp_ok $ret, '==', Module::Signature::SIGNATURE_OK(), 'Valid signature'; } Module-Starter-Plugin-CGIApp-0.44/share/titanium/MANIFEST000444001750001750 6412577474360 23203 0ustar00jaldharjaldhar000000000000 Module-Starter-Plugin-CGIApp-0.44/share/titanium/boilerplate.t000444001750001750 344012577474360 24602 0ustar00jaldharjaldhar000000000000#!/usr/bin/perl # Some tests to make sure you are not using default placeholders from the # templates. Remove this file after you have customized the distribution. use strict; use warnings; use English qw( -no_match_vars ); use Test::More tests => 4 + ; sub not_in_file_ok { my ( $filename, %regex ) = @_; open my $fh, '<', $filename or die "couldn't open $filename for reading: $ERRNO"; my %violated; while ( my $line = <$fh> ) { while ( my ( $desc, $regex ) = each %regex ) { if ( $line =~ $regex ) { push @{ $violated{$desc} ||= [] }, $NR; } } } close $fh or die "Close failed: $ERRNO"; if (%violated) { fail("$filename contains boilerplate text"); for ( keys %violated ) { diag "$_ appears on lines @{$violated{$_}}"; } } else { pass("$filename contains no boilerplate text"); } return; } sub module_boilerplate_ok { my ($module) = @_; not_in_file_ok( $module => 'the great new $MODULENAME' => qr/\Q - The great new \E/msx, 'boilerplate description' => qr/\QQuick summary of what the module\E/msx, 'stub function definition' => qr/function[12]/msx, ); return; } not_in_file_ok( '' => 'Abstract' => qr/\QAbstract goes here.\E/msx, ); not_in_file_ok( LICENSE => 'License terms' => qr/\QInsert license text here.\E/msx, ); not_in_file_ok( README => 'The README is used...' => qr/\QThe README is used\E/msx, "'version information here'" => qr/\Qto provide version information\E/msx, ); not_in_file_ok( Changes => 'placeholder date/time' => qr{Date/time}msx ); module_boilerplate_ok(''); Module-Starter-Plugin-CGIApp-0.44/share/titanium/perl-critic.xt000444001750001750 112012577474360 24676 0ustar00jaldharjaldhar000000000000#!/usr/bin/perl # Test that the module passes perlcritic use Test::More; use strict; BEGIN { $| = 1; $^W = 1; } use File::Find; my @MODULES = ( 'Perl::Critic 1.098', "Test::Perl::Critic 1.01 (-profile => 'xt/perlcriticrc')", ); # Load the testing modules foreach my $MODULE ( @MODULES ) { eval "use $MODULE"; if ( $@ ) { plan( skip_all => "$MODULE not available for testing" ); } } my @files = qw{ }; foreach my $file (@files) { critic_ok($file); } done_testing(scalar @files); 1; Module-Starter-Plugin-CGIApp-0.44/share/titanium/Changes000444001750001750 17712577474360 23372 0ustar00jaldharjaldhar000000000000Revision history for 0.01 First version, released on an unsuspecting world. Module-Starter-Plugin-CGIApp-0.44/share/titanium/server.pl000444001750001750 54512577474360 23741 0ustar00jaldharjaldhar000000000000use warnings; use strict; use CGI::Application::Server; use lib 'lib'; use ; my $app = ->new( TMPL_PATH => './share/templates', PARAMS => { }, ); my $server = CGI::Application::Server->new(); $server->document_root('./t/www'); $server->entry_points({ '/index.cgi' => $app, }); $server->run; Module-Starter-Plugin-CGIApp-0.44/share/titanium/pod.xt000444001750001750 57112577474360 23234 0ustar00jaldharjaldhar000000000000#!/usr/bin/perl # Test that the syntax of our POD documentation is valid use Test::More; use strict; BEGIN { $| = 1; $^W = 1; } my @MODULES = ( 'Pod::Simple 3.07', 'Test::Pod 1.26', ); # Load the testing modules foreach my $MODULE ( @MODULES ) { eval "use $MODULE"; if ( $@ ) { plan( skip_all => "$MODULE not available for testing" ); } } all_pod_files_ok(); 1; Module-Starter-Plugin-CGIApp-0.44/share/titanium/perlcriticrc000444001750001750 23612577474360 24503 0ustar00jaldharjaldhar000000000000severity = brutal [-Documentation::RequirePodAtEnd] [-Documentation::RequirePodSections] [-Documentation::PodSpelling] [-Miscellanea::RequireRcsKeywords] Module-Starter-Plugin-CGIApp-0.44/share/default000755001750001750 012577474357 21555 5ustar00jaldharjaldhar000000000000Module-Starter-Plugin-CGIApp-0.44/share/default/01-load.t000444001750001750 53612577474360 23212 0ustar00jaldharjaldhar000000000000#!/usr/bin/perl # Test to see if the module loads correctly. use warnings; use strict; use Test::More tests => ; BEGIN { use_ok(''); } diag( "Testing $::VERSION, Perl $], $^X\n", ); Module-Starter-Plugin-CGIApp-0.44/share/default/runmode1.html000444001750001750 36412577474360 24307 0ustar00jaldharjaldhar000000000000 <!-- TMPL_VAR message -->

Module-Starter-Plugin-CGIApp-0.44/share/default/Module.pm000444001750001750 555612577474360 23502 0ustar00jaldharjaldhar000000000000 =head1 NAME - The great new web application! =head1 SYNOPSIS use ; my $app = ->new(); $app->run(); =head1 ABSTRACT A brief summary of what does. =cut package ; use warnings; use strict; use base 'CGI::Application'; use Carp qw( croak ); use File::ShareDir qw( dist_dir ); use File::Spec qw (); =head1 VERSION This document describes Version 0.01 =cut our $VERSION = '0.01'; =head1 DESCRIPTION Overview of functionality and purpose of web application module ... =head1 METHODS =head2 SUBCLASSED METHODS =head3 setup Sets up the run mode dispatch table and the start, error, and default run modes. If the template path is not set, sets it to a default value. TODO: change all these values to ones more appropriate for your application. =cut sub setup { my ($self) = @_; $self->start_mode('runmode1'); $self->error_mode('runmode1'); $self->run_modes( [qw/ runmode1 /] ); if ( !$self->tmpl_path ) { $self->tmpl_path( File::Spec->catdir( dist_dir(''), 'templates' ) ); } $self->run_modes( AUTOLOAD => 'runmode1' ); return; } =pod TODO: Other methods inherited from CGI::Application go here. =head2 RUN MODES =head3 runmode1 * Purpose * Expected parameters * Function on success * Function on failure TODO: Describe runmode1 here. Rename runmode1 to something more appropriate for your application. =cut sub runmode1 { my ($self) = @_; my $template = $self->load_tmpl; $template->param( message => 'Hello world!' ); return $template->output; } =head2 OTHER METHODS =head3 function1 TODO: Describe function1 here. Rename function1 to something more appropriate for your application. =cut sub function1 { my ($self) = @_; return 1; } =pod TODO: Other methods in your public interface go here. =cut # TODO: Private methods go here. Start their names with an _ so they are skipped # by Pod::Coverage. =head1 BUGS AND LIMITATIONS There are no known problems with this module. Please report any bugs or feature requests to C at rt.cpan.org>, or through the web interface at L>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. =head1 SEE ALSO L =head1 THANKS List acknowledgements here or delete this section. =head1 AUTHOR , C<< <> >> =head1 LICENSE AND COPYRIGHT Copyright (C) , . All rights reserved. The full text of the license can be found in the LICENSE file included with this distribution. =cut 1; # End of __END__ Module-Starter-Plugin-CGIApp-0.44/share/default/LICENSE000444001750001750 17512577474360 22674 0ustar00jaldharjaldhar000000000000Copyright (C) , . All rights reserved. Insert license text here. Module-Starter-Plugin-CGIApp-0.44/share/default/README000444001750001750 430312577474360 22564 0ustar00jaldharjaldhar000000000000 The README is used to introduce the module and provide instructions on how to install the module, any machine dependencies it may have (for example C compilers and installed libraries) and any other information that should be provided before the module is installed. A README file is required for CPAN modules since CPAN extracts the README file from a module distribution so that people browsing the archive can use it get an idea of the modules uses. It is usually a good idea to provide version information here so that people can decide whether fixes for the module are worth downloading. INSTALLATION DEPENDENCIES This module requires these other modules: CGI::Application 4.04 File::ShareDir HTML::Template If you want to use the development server (server.pl) you will also need: CGI::Application::Server At build time you will need the above modules plus the following if you want to run the tests: Test::More Test::WWW::Mechanize::CGIApp The signature can be tested by installing the following module: Module::Signature and setting the environment variable TEST_SIGNATURE to 1. Further tests are enabled by setting the environment variable RELEASE_TESTING to 1 and installing the following modules: Perl::Critic 1.098 Pod::Coverage 0.18 Pod::Simple 3.07 Test::Perl::Critic 1.01 Test::Pod 1.26 Test::Pod::Coverage 1.08 They are all available on CPAN (http://www.cpan.org) SUPPORT AND DOCUMENTATION After installing, you can find documentation for this module with the perldoc command. perldoc You can also look for information at: Search CPAN http://search.cpan.org/dist/ CPAN Request Tracker: http://rt.cpan.org/NoAuth/Bugs.html?Dist= AnnoCPAN, annotated CPAN documentation: http://annocpan.org/dist/ CPAN Ratings: http://cpanratings.perl.org/d/ LICENSE AND COPYRIGHT Copyright (C) , . All rights reserved. The full text of the license can be found in the LICENSE file included with this distribution. Module-Starter-Plugin-CGIApp-0.44/share/default/Build.PL000444001750001750 161112577474357 23205 0ustar00jaldharjaldhar000000000000use 5.006; use strict; use warnings; use Module::Build; my $builder = Module::Build->new( dist_name => '', module_name => '', dist_abstract => 'Abstract goes here.', dist_author => ' <>', license => '', dist_version_from => '', share_dir => 'share', build_requires => { 'Test::More' => 0, 'Test::WWW::Mechanize::CGIApp' => 0, }, requires => { 'perl' => 5.006, 'CGI::Application' => 4.04, 'HTML::Template' => 0, }, add_to_cleanup => [ '-*' ], create_makefile_pl => 'traditional', sign => 1, ); $builder->create_build_script(); Module-Starter-Plugin-CGIApp-0.44/share/default/pod-coverage.xt000444001750001750 57212577474360 24620 0ustar00jaldharjaldhar000000000000#!/usr/bin/perl # Ensure pod coverage in your distribution use Test::More; use strict; BEGIN { $| = 1; $^W = 1; } my @MODULES = ( 'Pod::Coverage 0.18', 'Test::Pod::Coverage 1.08', ); # Load the testing modules foreach my $MODULE ( @MODULES ) { eval "use $MODULE"; if ( $@ ) { plan( skip_all => "$MODULE not available for testing" ); } } all_pod_coverage_ok(); 1; Module-Starter-Plugin-CGIApp-0.44/share/default/MI_Makefile.PL000444001750001750 71112577474360 24222 0ustar00jaldharjaldhar000000000000use inc::Module::Install; name ''; all_from ''; author ''; license ''; perl_version '5.008'; build_requires 'Test::More' => 0; build_requires 'Test::WWW::Mechanize::CGIApp' => 0; requires 'CGI::Application' => 4.04; requires 'HTML::Template' => 0; install_share; auto_install; sign 1; WriteAll; Module-Starter-Plugin-CGIApp-0.44/share/default/Makefile.PL000444001750001750 135312577474360 23660 0ustar00jaldharjaldhar000000000000use 5.006; use strict; use warnings; use ExtUtils::MakeMaker; WriteMakefile( NAME => '', VERSION_FROM => '', ABSTRACT_FROM => '', AUTHOR => ' <>', LICENSE => '', PL_FILES => {}, PREREQ_PM => { 'CGI::Application' => 4.04, 'HTML::Template' => 0, 'Test::More' => 0, 'Test::WWW::Mechanize::CGIApp' => 0, }, SIGN => 1, dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', }, clean => { FILES => '-*' }, ); Module-Starter-Plugin-CGIApp-0.44/share/default/MANIFEST.SKIP000444001750001750 13612577474357 23570 0ustar00jaldharjaldhar000000000000#defaults ^Makefile$ ^blib/ ^pm_to_blib ^blibdirs ^Build$ ^Build.bat$ ^_build/ .git .svn .tmp Module-Starter-Plugin-CGIApp-0.44/share/default/test-app.t000444001750001750 54712577474360 23614 0ustar00jaldharjaldhar000000000000#!/usr/bin/perl # Test application functionality use strict; use warnings; use Test::More tests => 1; use Test::WWW::Mechanize::CGIApp; use ; my $mech = Test::WWW::Mechanize::CGIApp->new; $mech->app( sub { my $app = ->new(PARAMS => { }); $app->run(); } ); $mech->get_ok(q{/}); Module-Starter-Plugin-CGIApp-0.44/share/default/00-signature.t000444001750001750 176312577474357 24324 0ustar00jaldharjaldhar000000000000#!/usr/bin/perl # Test if the modules signature is valid. use warnings; use strict; use Test::More; if ( !$ENV{TEST_SIGNATURE} ) { plan skip_all => 'Set the environment variable TEST_SIGNATURE to enable this test.'; } elsif ( !eval { require Module::Signature; 1 } ) { plan skip_all => 'Next time around, consider install Module::Signature, ' . 'so you can verify the integrity of this distribution.'; } elsif ( !-e 'SIGNATURE' ) { plan skip_all => 'SIGNATURE not found'; } elsif ( -s 'SIGNATURE' == 0 ) { plan skip_all => 'SIGNATURE file empty'; } elsif ( !eval { require Socket; Socket::inet_aton('pool.sks-keyservers.net') } ) { plan skip_all => 'Cannot connect to the keyserver to check module signature'; } else { plan tests => 1; } my $ret = Module::Signature::verify(); SKIP: { skip 'Module::Signature cannot verify', 1 if $ret eq Module::Signature::CANNOT_VERIFY(); cmp_ok $ret, '==', Module::Signature::SIGNATURE_OK(), 'Valid signature'; } Module-Starter-Plugin-CGIApp-0.44/share/default/MANIFEST000444001750001750 6412577474360 22775 0ustar00jaldharjaldhar000000000000 Module-Starter-Plugin-CGIApp-0.44/share/default/boilerplate.t000444001750001750 344012577474357 24402 0ustar00jaldharjaldhar000000000000#!/usr/bin/perl # Some tests to make sure you are not using default placeholders from the # templates. Remove this file after you have customized the distribution. use strict; use warnings; use English qw( -no_match_vars ); use Test::More tests => 4 + ; sub not_in_file_ok { my ( $filename, %regex ) = @_; open my $fh, '<', $filename or die "couldn't open $filename for reading: $ERRNO"; my %violated; while ( my $line = <$fh> ) { while ( my ( $desc, $regex ) = each %regex ) { if ( $line =~ $regex ) { push @{ $violated{$desc} ||= [] }, $NR; } } } close $fh or die "Close failed: $ERRNO"; if (%violated) { fail("$filename contains boilerplate text"); for ( keys %violated ) { diag "$_ appears on lines @{$violated{$_}}"; } } else { pass("$filename contains no boilerplate text"); } return; } sub module_boilerplate_ok { my ($module) = @_; not_in_file_ok( $module => 'the great new $MODULENAME' => qr/\Q - The great new \E/msx, 'boilerplate description' => qr/\QQuick summary of what the module\E/msx, 'stub function definition' => qr/function[12]/msx, ); return; } not_in_file_ok( '' => 'Abstract' => qr/\QAbstract goes here.\E/msx, ); not_in_file_ok( LICENSE => 'License terms' => qr/\QInsert license text here.\E/msx, ); not_in_file_ok( README => 'The README is used...' => qr/\QThe README is used\E/msx, "'version information here'" => qr/\Qto provide version information\E/msx, ); not_in_file_ok( Changes => 'placeholder date/time' => qr{Date/time}msx ); module_boilerplate_ok(''); Module-Starter-Plugin-CGIApp-0.44/share/default/perl-critic.xt000444001750001750 112012577474360 24470 0ustar00jaldharjaldhar000000000000#!/usr/bin/perl # Test that the module passes perlcritic use Test::More; use strict; BEGIN { $| = 1; $^W = 1; } use File::Find; my @MODULES = ( 'Perl::Critic 1.098', "Test::Perl::Critic 1.01 (-profile => 'xt/perlcriticrc')", ); # Load the testing modules foreach my $MODULE ( @MODULES ) { eval "use $MODULE"; if ( $@ ) { plan( skip_all => "$MODULE not available for testing" ); } } my @files = qw{ }; foreach my $file (@files) { critic_ok($file); } done_testing(scalar @files); 1; Module-Starter-Plugin-CGIApp-0.44/share/default/Changes000444001750001750 17712577474360 23164 0ustar00jaldharjaldhar000000000000Revision history for 0.01 First version, released on an unsuspecting world. Module-Starter-Plugin-CGIApp-0.44/share/default/server.pl000444001750001750 54512577474360 23533 0ustar00jaldharjaldhar000000000000use warnings; use strict; use CGI::Application::Server; use lib 'lib'; use ; my $app = ->new( TMPL_PATH => './share/templates', PARAMS => { }, ); my $server = CGI::Application::Server->new(); $server->document_root('./t/www'); $server->entry_points({ '/index.cgi' => $app, }); $server->run; Module-Starter-Plugin-CGIApp-0.44/share/default/pod.xt000444001750001750 57112577474360 23026 0ustar00jaldharjaldhar000000000000#!/usr/bin/perl # Test that the syntax of our POD documentation is valid use Test::More; use strict; BEGIN { $| = 1; $^W = 1; } my @MODULES = ( 'Pod::Simple 3.07', 'Test::Pod 1.26', ); # Load the testing modules foreach my $MODULE ( @MODULES ) { eval "use $MODULE"; if ( $@ ) { plan( skip_all => "$MODULE not available for testing" ); } } all_pod_files_ok(); 1; Module-Starter-Plugin-CGIApp-0.44/share/default/perlcriticrc000444001750001750 23612577474357 24303 0ustar00jaldharjaldhar000000000000severity = brutal [-Documentation::RequirePodAtEnd] [-Documentation::RequirePodSections] [-Documentation::PodSpelling] [-Miscellanea::RequireRcsKeywords] Module-Starter-Plugin-CGIApp-0.44/script000755001750001750 012577474360 20325 5ustar00jaldharjaldhar000000000000Module-Starter-Plugin-CGIApp-0.44/script/titanium-starter000444001750001750 572312577474360 23730 0ustar00jaldharjaldhar000000000000#!/usr/bin/perl -w =head1 NAME titanium-starter - creates a skeleton Titanium project =cut use warnings; use strict; our $VERSION = '0.30'; use Module::Starter qw( Module::Starter::Plugin::CGIApp ); # Provide a sane default use File::ShareDir qw( dist_dir ); use File::Spec; if ( !$ENV{MODULE_TEMPLATE_DIR} ) { $ENV{MODULE_TEMPLATE_DIR} = ## no critic 'Variables/RequireLocalizedPunctuationVars' File::Spec->catdir( dist_dir('Module-Starter-Plugin-CGIApp'), 'titanium' ); } use Module::Starter::App; Module::Starter::App->run; =head1 SYNOPSIS titanium-starter --module=MyApp --author="Jaldhar H. Vyas" --email=jaldhar@braincells.com Result: MyApp MyApp/Changes MyApp/lib MyApp/lib/MyApp.pm MyApp/LICENSE MyApp/Makefile.PL MyApp/MANIFEST.SKIP MyApp/MANIFEST MyApp/README MyApp/server.pl MyApp/share/templates MyApp/share/templates/runmode1.html MyApp/t MyApp/t/00-signature.t MyApp/t/01-load.t MyApp/t/boilerplate.t MyApp/t/test-app.t MyApp/t/www MyApp/t/www/PUT.STATIC.CONTENT.HERE MyApp/xt MyApp/xt/perlcriticrc MyApp/xt/perl-critic.t MyApp/xt/pod-coverage.t MyApp/xt/pod.t Options: --module=module Module name --dir=dirname Directory name to create new module in (optional) --builder=module Build with 'ExtUtils::MakeMaker' or 'Module::Build' --eumm Same as --builder=ExtUtils::MakeMaker --mb Same as --builder=Module::Build --mi Same as --builder=Module::Install --author=name Author's name (required) --email=email Author's email (required) --license=type License under which the module will be distributed (default is the same license as perl) --verbose Print progress messages while working --force Delete pre-existing files if needed --help Show this message =head1 DESCRIPTION Set up the skeleton of a L-based project, including a module, some templates and some automated tests. By default the skeleton files will come within a shared directory where L is stored. See L for more information on how this works. =head1 CONFIGURATION titanium-starter will look for a configuration file before reading its command line parameters. The default location is C<$HOME/.module-starter/config> but if the MODULE_STARTER_DIR environment variable is set, titanium-starter will look for C in that directory. The configuration file is just a list of names and values, separated by colons. Values that take lists are just space separated. A sample configuration file might read: author: Jaldhar H. Vyas email: jaldhar@braincells.com template_dir: ~/.module-starter/cgiapp/templates colors: red green blue This format may become more elaborate in the future, but a file of this type should remain valid. =cut Module-Starter-Plugin-CGIApp-0.44/script/cgiapp-starter000444001750001750 573212577474360 23341 0ustar00jaldharjaldhar000000000000#!/usr/bin/perl -w =head1 NAME cgiapp-starter - creates a skeleton CGI::Application project =cut use warnings; use strict; our $VERSION = '0.30'; use Module::Starter qw( Module::Starter::Plugin::CGIApp ); # Provide a sane default use File::ShareDir qw( dist_dir ); use File::Spec; if ( !$ENV{MODULE_TEMPLATE_DIR} ) { $ENV{MODULE_TEMPLATE_DIR} = ## no critic 'Variables/RequireLocalizedPunctuationVars' File::Spec->catdir( dist_dir('Module-Starter-Plugin-CGIApp'), 'default' ); } use Module::Starter::App; Module::Starter::App->run; =head1 SYNOPSIS cgiapp-starter --module=MyApp --author="Jaldhar H. Vyas" --email=jaldhar@braincells.com Result: MyApp MyApp/Changes MyApp/lib MyApp/lib/MyApp.pm MyApp/LICENSE MyApp/Makefile.PL MyApp/MANIFEST.SKIP MyApp/MANIFEST MyApp/README MyApp/server.pl MyApp/share/templates MyApp/share/templates/runmode1.html MyApp/t MyApp/t/00-signature.t MyApp/t/01-load.t MyApp/t/boilerplate.t MyApp/t/test-app.t MyApp/t/www MyApp/t/www/PUT.STATIC.CONTENT.HERE MyApp/xt MyApp/xt/perlcriticrc MyApp/xt/perl-critic.t MyApp/xt/pod-coverage.t MyApp/xt/pod.t Options: --module=module Module name --dir=dirname Directory name to create new module in (optional) --builder=module Build with 'ExtUtils::MakeMaker' or 'Module::Build' --eumm Same as --builder=ExtUtils::MakeMaker --mb Same as --builder=Module::Build --mi Same as --builder=Module::Install --author=name Author's name (required) --email=email Author's email (required) --license=type License under which the module will be distributed (default is the same license as perl) --verbose Print progress messages while working --force Delete pre-existing files if needed --help Show this message =head1 DESCRIPTION Set up the skeleton of a L-based project, including a module, some templates and some automated tests. By default the skeleton files will come within a shared directory where L is stored. See L for more information on how this works. =head1 CONFIGURATION cgiapp-starter will look for a configuration file before reading its command line parameters. The default location is C<$HOME/.module-starter/config> but if the MODULE_STARTER_DIR environment variable is set, cgiapp-starter will look for C in that directory. The configuration file is just a list of names and values, separated by colons. Values that take lists are just space separated. A sample configuration file might read: author: Jaldhar H. Vyas email: jaldhar@braincells.com template_dir: ~/.module-starter/cgiapp/templates colors: red green blue This format may become more elaborate in the future, but a file of this type should remain valid. =cut