MooseX-Daemonize-0.20/000700 000766 000024 00000000000 12564001461 015016 5ustar00etherstaff000000 000000 MooseX-Daemonize-0.20/Build.PL000644 000766 000024 00000010100 12564001461 016314 0ustar00etherstaff000000 000000 use Devel::AssertOS qw[-MSWin32]; # This Build.PL for MooseX-Daemonize was generated by # Dist::Zilla::Plugin::ModuleBuildTiny::Fallback 0.018 use strict; use warnings; my %configure_requires = ( 'Devel::AssertOS' => '0', 'Devel::CheckOS' => '1.63', 'Module::Build::Tiny' => '0.007', ); my @missing = grep { ! eval "require $_; $_->VERSION($configure_requires{$_}); 1" } keys %configure_requires; if (not @missing) { # This section for MooseX-Daemonize was generated by Dist::Zilla::Plugin::ModuleBuildTiny 0.013. use strict; use warnings; use 5.008003; # use Module::Build::Tiny 0.007; Module::Build::Tiny::Build_PL(); } else { if ($ENV{PERL_MB_FALLBACK_SILENCE_WARNING}) { warn <<'EOW'; *** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING *** If you're seeing this warning, your toolchain is really, really old* and you'll almost certainly have problems installing CPAN modules from this century. But never fear, dear user, for we have the technology to fix this! If you're using CPAN.pm to install things, then you can upgrade it using: cpan CPAN If you're using CPANPLUS to install things, then you can upgrade it using: cpanp CPANPLUS If you're using cpanminus, you shouldn't be seeing this message in the first place, so please file an issue on github. This public service announcement was brought to you by the Perl Toolchain Gang, the irc.perl.org #toolchain IRC channel, and the number 42. ---- * Alternatively, you are running this file manually, in which case you need to learn to first fulfill all configure requires prerequisites listed in META.yml or META.json -- or use a cpan client to install this distribution. You can also silence this warning for future installations by setting the PERL_MB_FALLBACK_SILENCE_WARNING environment variable, but please don't do that until you fix your toolchain as described above. EOW sleep 10 if -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT)); } # This section was automatically generated by Dist::Zilla::Plugin::ModuleBuild v5.039. use strict; use warnings; require Module::Build; Module::Build->VERSION(0.28); my %module_build_args = ( "configure_requires" => { "Devel::AssertOS" => 0, "Devel::CheckOS" => "1.63", "Module::Build::Tiny" => "0.007", "perl" => "5.006" }, "dist_abstract" => "Role for daemonizing your Moose based application", "dist_author" => [ "Stevan Little ", "Chris Prather " ], "dist_name" => "MooseX-Daemonize", "dist_version" => "0.20", "license" => "perl", "module_name" => "MooseX::Daemonize", "recursive_test_files" => 1, "requires" => { "File::Path" => "2.08", "Moose" => 0, "Moose::Role" => 0, "Moose::Util::TypeConstraints" => 0, "MooseX::Getopt" => 0, "MooseX::Getopt::OptionTypeMap" => 0, "MooseX::Types::Path::Class" => 0, "POSIX" => 0, "Sub::Exporter" => 0, "Test::Builder" => 0, "namespace::autoclean" => 0, "perl" => "5.008003", "strict" => 0, "warnings" => 0 }, "test_requires" => { "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "File::Spec::Functions" => 0, "File::Temp" => 0, "Test::Fatal" => 0, "Test::Moose" => 0, "Test::More" => "0.88", "constant" => 0, "perl" => "5.008003" } ); my %fallback_build_requires = ( "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "File::Spec::Functions" => 0, "File::Temp" => 0, "Test::Fatal" => 0, "Test::Moose" => 0, "Test::More" => "0.88", "constant" => 0, "perl" => "5.008003" ); unless ( eval { Module::Build->VERSION(0.4004) } ) { delete $module_build_args{test_requires}; $module_build_args{build_requires} = \%fallback_build_requires; } my $build = Module::Build->new(%module_build_args); $build->create_build_script; } MooseX-Daemonize-0.20/Changes000644 000766 000024 00000011102 12564001461 016316 0ustar00etherstaff000000 000000 Revision history for MooseX-Daemonize 0.20 2015-08-16 03:27:34Z - some tooling modernization and documentation cleanup. 0.19 2014-02-07 04:19:25Z - fix buggy test that does not try hard enough to look for a nonexistent pid (ether) - repository moved to github moose organization 0.18 2013-05-13 19:34:52Z - make tests a bit more tolerant of slow systems, by waiting longer for processes to die (RT#85229, Chisel Wright) 0.17 2013-04-20 - Makefile.PL now prevents installation on MSWin32 0.16 2013-04-14 - fix incompatibilities with Test::Builder 1.005+ (schwern, RT#76523) - add missing dependency on the version of File::Path which added make_path (RT#79169, Jonathan Sailor) - add missing test dependency on Test::Exception (RT#70382) - document the 'basedir' attribute and its behaviour (RT#83055) - add 'documentation' keys for public attributes, to be used when displaying --help (RT#54295) 0.15 2012-05-31 - fix versions 0.14 2012-05-30 - recommend Daemon::Control instead - fix bug with pidbase dir not being created if it doesn't already exist 0.13 2011-07-06 - adding docs related to closing all filehandles and the issues that can cause with things like Log::Log4Perl (thanks to Maik Hentsche via RT #67016) - updating copyright dates 0.12 2010-07-11 - release without the .git directory in it 0.11 2010-07-10 * MooseX::Daemonize::Core - make the options to daemonize() into proper attributes but still retained back-compat (Thanks to Magnus Erixzon) - adjusted docs and tests - removed the pod.t and pod-coverage.t tests 0.10 2010-04-17 - updated copyrights - removed the POE test because it was causing random failures when installing from CPAN and not adding enough value to keep around - applied POD corrections from RT #50091 (thanks to Kostyuk Oleg) 0.09 2009-10-05 * s/no_plan => 1/'no_plan'/g (Dave Rolsky) * Synchronize Version numbers 0.08 2008-09-07 * t/ - Removed usage of Cwd in favour of a temporary dir to prevent test fails when running in an unwritable dir - patch to ensure that t/01.filecreate.t passes (thanks to Jose Luis Rey) 0.07 2008-05-24 * MooseX::Daemonize - Made default pidbase '/var/run' rather than './var/run' * t/ - Small fixups to pidfile testing in t/31.with_pid_file_and_poe.t ~ Removed the Build.PL since Module::Install has removed their support 0.06 2007-12-21 * MooseX::Daemonize - Fix logic that kills process so it doens't always warn about undead process - Added stop_timeout to allow user to control timings. - Refactored to roles - removed Proc::Daemon dependency - removed File::Pid dependency - added exit_code and status_message to capture the exit code and a status message :) - refactored start/stop/restart to use these - added tests for this - added a &status command which returns a bool telling you if the daemon is running or not - added tests for this * Test::MooseX::Daemonize - updated docs - removed Proc::Daemon dependency * MooseX::Daemonize::Core - the core daemonization methods are here - added tests for this * MooseX::Daemonize::WithPidFile - the PID file handling is added to the core here - added tests for this * MooseX::Daemonize::Pid - added this package to replace the File::Pid stuff * MooseX::Daemonize::Pid::File - added this package to replace the File::Pid stuff, it is a subclass of MooseX::Daemonize::Pid (stevan) - added tests for this (stevan) 0.05 2007-11-18 - Fix logic that kills process so it doens't always warn about undead process - Added stop_timeout to allow user to control timings. 0.04 2007-11-11 - Fix stupid perlcritic.t cause the Module::Starter::PBP tests were stupid but I didn't realize it. 0.03 2007-10-22 - Add File::Slurp to dependencies so our tests pass better 0.02 2007-09-19 - Fixed bug where sometimes the pidfile is writeable but pidbase is not -- reported by dec - Fixed bug where the pidfile wasn't being updated properly -- reported by dec - Added is_daemon attribute - Added another fork to make sure we short circuit out of the daemonize process properly - Switch to File::Pid - Add the GetOpt prereq - Adjust the kill timings - Added THANKS to pod 0.0.1 2007-05-16 Initial release. MooseX-Daemonize-0.20/CONTRIBUTING000644 000766 000024 00000007272 12564001461 016672 0ustar00etherstaff000000 000000 CONTRIBUTING Thank you for considering contributing to this distribution. This file contains instructions that will help you work with the source code. PLEASE NOTE that if you have any questions or difficulties, you can reach the maintainer(s) through the bug queue described later in this document (preferred), or by emailing the releaser directly. You are not required to follow any of the steps in this document to submit a patch or bug report; these are just recommendations, intended to help you (and help us help you faster). The distribution is managed with Dist::Zilla (https://metacpan.org/release/Dist-Zilla). This means than many of the usual files you might expect are not in the repository, but are generated at release time (e.g. Makefile.PL). However, you can run tests directly using the 'prove' tool: $ prove -l $ prove -lv t/some_test_file.t $ prove -lvr t/ In most cases, 'prove' is entirely sufficent for you to test any patches you have. You may need to satisfy some dependencies. The easiest way to satisfy dependencies is to install the last release -- this is available at https://metacpan.org/release/MooseX-Daemonize. If you use cpanminus, you can do it without downloading the tarball first: $ cpanm --reinstall --installdeps --with-recommends MooseX::Daemonize Dist::Zilla is a very powerful authoring tool, but requires a number of author-specific plugins. If you would like to use it for contributing, install it from CPAN, then run one of the following commands, depending on your CPAN client: $ cpan `dzil authordeps --missing` or $ dzil authordeps --missing | cpanm You should then also install any additional requirements not needed by the dzil build but may be needed by tests or other development: $ cpan `dzil listdeps --author --missing` or $ dzil listdeps --author --missing | cpanm Or, you can use the 'dzil stale' command to install all requirements at once: $ cpan Dist::Zilla::App::Command::stale $ cpan `dzil stale --all` or $ cpanm Dist::Zilla::App::Command::stale $ dzil stale --all | cpanm You can also do this via cpanm directly: $ cpanm --reinstall --installdeps --with-develop --with-recommends MooseX::Daemonize Once installed, here are some dzil commands you might try: $ dzil build $ dzil test $ dzil test --release $ dzil xtest $ dzil listdeps --json $ dzil build --notgz You can learn more about Dist::Zilla at http://dzil.org/. The code for this distribution is hosted at GitHub. The repository is: https://github.com/moose/MooseX-Daemonize You can submit code changes by forking the repository, pushing your code changes to your clone, and then submitting a pull request. Detailed instructions for doing that is available here: https://help.github.com/articles/creating-a-pull-request If you have found a bug, but do not have an accompanying patch to fix it, you can submit an issue report here: https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Daemonize or via bug-MooseX-Daemonize@rt.cpan.org. There is also a mailing list available for users of this distribution, at http://lists.perl.org/list/moose.html. There is also an irc channel available for users of this distribution, at irc://irc.perl.org/#moose. If you send me a patch or pull request, your name and email address will be included in the documentation as a contributor (using the attribution on the commit or patch), unless you specifically request for it not to be. If you wish to be listed under a different name or address, you should submit a pull request to the .mailmap file to contain the correct mapping. This file was generated via Dist::Zilla::Plugin::GenerateFile::ShareDir 0.006 from a template file originating in Dist-Zilla-PluginBundle-Author-ETHER-0.102. MooseX-Daemonize-0.20/dist.ini000600 000766 000024 00000001522 12564001461 016464 0ustar00etherstaff000000 000000 name = MooseX-Daemonize author = Stevan Little author = Chris Prather copyright_holder = Chris Prather license = Perl_5 copyright_year = 2007 [@Author::ETHER] :version = 0.101 licence = LICENCE Authority.authority = cpan:PERIGRIN -remove = Test::PodSpelling ; TODO -remove = Test::Pod::No404s Test::MinimumVersion.max_target_perl = 5.008003 StaticInstall.dry_run = 0 ; we can safely set this here [Prereqs / RuntimeRequires] perl = 5.008003 File::Path = 2.08 [RemovePrereqs] remove = Test::MooseX::Daemonize::Testable [MetaResources] x_IRC = irc://irc.perl.org/#moose x_MailingList = http://lists.perl.org/list/moose.html ; must be after installer plugins [AssertOS] :version = 0.06 os = -MSWin32 bundle = 0 [Test::CheckBreaks] conflicts_module = Moose::Conflicts MooseX-Daemonize-0.20/examples/000700 000766 000024 00000000000 12564001461 016634 5ustar00etherstaff000000 000000 MooseX-Daemonize-0.20/IDEAS000644 000766 000024 00000001763 12564001461 015607 0ustar00etherstaff000000 000000 * 2:36 : mike : A slightly different would be to have another object, which is a daemon, which is the keeper of the PIDs. It can bind to a port and then your other objects would actually cause things to happen without needing a PID file. [12:16] I guess what I'm saying is that start() has three possible results: success, already running, failed to start [12:17] I am not as familair as you are with this stuff so I am not 100% of al the things [12:17] and stop() does too: success, not running, failed to stop [12:17] k [12:17] perfect [12:17] I will add em :) ... [12:18] can you map the exit value to those three states (sorry I am not familiar with these details myself) [12:18] for most people, the right answer is that start()'s success/already_running should return OK to the OS, failed returns error [12:18] OK = 0, ERROR = 1? [12:18] and stop()'s success/not_running should also be OK (exit 0)MooseX-Daemonize-0.20/INSTALL000644 000766 000024 00000001736 12564001461 016070 0ustar00etherstaff000000 000000 This is the Perl distribution MooseX-Daemonize. Installing MooseX-Daemonize is straightforward. ## Installation with cpanm If you have cpanm, you only need one line: % cpanm MooseX::Daemonize If you are installing into a system-wide directory, you may need to pass the "-S" flag to cpanm, which uses sudo to install the module: % cpanm -S MooseX::Daemonize ## Installing with the CPAN shell Alternatively, if your CPAN shell is set up, you should just be able to do: % cpan MooseX::Daemonize ## Manual installation As a last resort, you can manually install it. Download the tarball, untar it, then build it: % perl Build.PL % ./Build && ./Build test Then install it: % ./Build install If you are installing into a system-wide directory, you may need to run: % sudo ./Build install ## Documentation MooseX-Daemonize documentation is available as POD. You can run perldoc from a shell to read the documentation: % perldoc MooseX::Daemonize MooseX-Daemonize-0.20/lab/000700 000766 000024 00000000000 12564001461 015554 5ustar00etherstaff000000 000000 MooseX-Daemonize-0.20/lib/000700 000766 000024 00000000000 12564001461 015564 5ustar00etherstaff000000 000000 MooseX-Daemonize-0.20/LICENCE000644 000766 000024 00000043660 12564001461 016026 0ustar00etherstaff000000 000000 This software is copyright (c) 2007 by Chris Prather. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2007 by Chris Prather. This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2007 by Chris Prather. This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End MooseX-Daemonize-0.20/Makefile.PL000644 000766 000024 00000010031 12564001461 016775 0ustar00etherstaff000000 000000 use Devel::AssertOS qw[-MSWin32]; # This Makefile.PL for MooseX-Daemonize was generated by # Dist::Zilla::Plugin::MakeMaker::Fallback 0.019 # and Dist::Zilla::Plugin::MakeMaker::Awesome 0.34. # Don't edit it but the dist.ini and plugins used to construct it. use strict; use warnings; BEGIN { my %configure_requires = ( 'Devel::AssertOS' => '0', 'Devel::CheckOS' => '1.63', 'Module::Build::Tiny' => '0.007', ); my @missing = grep { ! eval "require $_; $_->VERSION($configure_requires{$_}); 1" } keys %configure_requires; if (not @missing) { print "Congratulations, your toolchain understands 'configure_requires'!\n\n"; } else { if (not $ENV{PERL_MM_FALLBACK_SILENCE_WARNING}) { warn <<'EOW'; *** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING *** If you're seeing this warning, your toolchain is really, really old* and you'll almost certainly have problems installing CPAN modules from this century. But never fear, dear user, for we have the technology to fix this! If you're using CPAN.pm to install things, then you can upgrade it using: cpan CPAN If you're using CPANPLUS to install things, then you can upgrade it using: cpanp CPANPLUS If you're using cpanminus, you shouldn't be seeing this message in the first place, so please file an issue on github. If you're installing manually, please retrain your fingers to run Build.PL when present instead. This public service announcement was brought to you by the Perl Toolchain Gang, the irc.perl.org #toolchain IRC channel, and the number 42. ---- * Alternatively, you are doing something overly clever, in which case you should consider setting the 'prefer_installer' config option in CPAN.pm, or 'prefer_makefile' in CPANPLUS, to 'mb" and '0' respectively. You can also silence this warning for future installations by setting the PERL_MM_FALLBACK_SILENCE_WARNING environment variable. EOW sleep 10 if -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT)); } } } # end BEGIN use 5.008003; use ExtUtils::MakeMaker; my %WriteMakefileArgs = ( "ABSTRACT" => "Role for daemonizing your Moose based application", "AUTHOR" => "Stevan Little , Chris Prather ", "CONFIGURE_REQUIRES" => { "Devel::AssertOS" => 0, "Devel::CheckOS" => "1.63", "Module::Build::Tiny" => "0.007" }, "DISTNAME" => "MooseX-Daemonize", "LICENSE" => "perl", "MIN_PERL_VERSION" => "5.008003", "NAME" => "MooseX::Daemonize", "PL_FILES" => {}, "PREREQ_PM" => { "File::Path" => "2.08", "Moose" => 0, "Moose::Role" => 0, "Moose::Util::TypeConstraints" => 0, "MooseX::Getopt" => 0, "MooseX::Getopt::OptionTypeMap" => 0, "MooseX::Types::Path::Class" => 0, "POSIX" => 0, "Sub::Exporter" => 0, "Test::Builder" => 0, "namespace::autoclean" => 0, "strict" => 0, "warnings" => 0 }, "TEST_REQUIRES" => { "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "File::Spec::Functions" => 0, "File::Temp" => 0, "Test::Fatal" => 0, "Test::Moose" => 0, "Test::More" => "0.88", "constant" => 0 }, "VERSION" => "0.20", "test" => { "TESTS" => "t/*.t" } ); my %FallbackPrereqs = ( "ExtUtils::MakeMaker" => 0, "File::Path" => "2.08", "File::Spec" => 0, "File::Spec::Functions" => 0, "File::Temp" => 0, "Moose" => 0, "Moose::Role" => 0, "Moose::Util::TypeConstraints" => 0, "MooseX::Getopt" => 0, "MooseX::Getopt::OptionTypeMap" => 0, "MooseX::Types::Path::Class" => 0, "POSIX" => 0, "Sub::Exporter" => 0, "Test::Builder" => 0, "Test::Fatal" => 0, "Test::Moose" => 0, "Test::More" => "0.88", "constant" => 0, "namespace::autoclean" => 0, "strict" => 0, "warnings" => 0 ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { delete $WriteMakefileArgs{TEST_REQUIRES}; delete $WriteMakefileArgs{BUILD_REQUIRES}; $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); MooseX-Daemonize-0.20/MANIFEST000644 000766 000024 00000001616 12564001461 016165 0ustar00etherstaff000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.039. Build.PL CONTRIBUTING Changes IDEAS INSTALL LICENCE MANIFEST META.json META.yml Makefile.PL README dist.ini examples/moose_room.pl lab/dec.pl lib/MooseX/Daemonize.pm lib/MooseX/Daemonize/Core.pm lib/MooseX/Daemonize/Pid.pm lib/MooseX/Daemonize/Pid/File.pm lib/MooseX/Daemonize/WithPidFile.pm lib/Test/MooseX/Daemonize.pm t/00-load.t t/00-report-prereqs.dd t/00-report-prereqs.t t/01-filecreate.t t/02-stdout.t t/10-pidfile.t t/20-core.t t/21-core-back-compat.t t/30-with-pid-file.t t/zzz-check-breaks.t weaver.ini xt/author/00-compile.t xt/author/clean-namespaces.t xt/author/eol.t xt/author/kwalitee.t xt/author/mojibake.t xt/author/no-tabs.t xt/release/changes_has_content.t xt/release/cpan-changes.t xt/release/distmeta.t xt/release/minimum-version.t xt/release/pod-coverage.t xt/release/pod-syntax.t xt/release/portability.t MooseX-Daemonize-0.20/META.json000644 000766 000024 00000130320 12564001461 016450 0ustar00etherstaff000000 000000 { "abstract" : "Role for daemonizing your Moose based application", "author" : [ "Stevan Little ", "Chris Prather " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 5.039, CPAN::Meta::Converter version 2.150005", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "MooseX-Daemonize", "no_index" : { "directory" : [ "t", "xt", "examples", "inc" ] }, "prereqs" : { "configure" : { "requires" : { "Devel::AssertOS" : "0", "Devel::CheckOS" : "1.63", "Module::Build::Tiny" : "0.007", "perl" : "5.006" } }, "develop" : { "recommends" : { "Dist::Zilla::PluginBundle::Author::ETHER" : "0.102" }, "requires" : { "Dist::Zilla" : "5", "Dist::Zilla::Plugin::AssertOS" : "0.06", "Dist::Zilla::Plugin::Authority" : "1.009", "Dist::Zilla::Plugin::AuthorityFromModule" : "0.002", "Dist::Zilla::Plugin::AutoMetaResources" : "0", "Dist::Zilla::Plugin::AutoPrereqs" : "0", "Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional" : "0.004", "Dist::Zilla::Plugin::CheckIssues" : "0", "Dist::Zilla::Plugin::CheckPrereqsIndexed" : "0", "Dist::Zilla::Plugin::CheckSelfDependency" : "0", "Dist::Zilla::Plugin::CheckStrictVersion" : "0", "Dist::Zilla::Plugin::ConfirmRelease" : "0", "Dist::Zilla::Plugin::CopyFilesFromRelease" : "0", "Dist::Zilla::Plugin::FileFinder::ByName" : "0", "Dist::Zilla::Plugin::GenerateFile::ShareDir" : "0", "Dist::Zilla::Plugin::Git::Check" : "0", "Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch" : "0.004", "Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts" : "0", "Dist::Zilla::Plugin::Git::Commit" : "2.020", "Dist::Zilla::Plugin::Git::Contributors" : "0.004", "Dist::Zilla::Plugin::Git::Describe" : "0.004", "Dist::Zilla::Plugin::Git::GatherDir" : "2.016", "Dist::Zilla::Plugin::Git::Push" : "0", "Dist::Zilla::Plugin::Git::Remote::Check" : "0", "Dist::Zilla::Plugin::Git::Tag" : "0", "Dist::Zilla::Plugin::GitHub::Update" : "0.40", "Dist::Zilla::Plugin::GithubMeta" : "0.54", "Dist::Zilla::Plugin::InstallGuide" : "0", "Dist::Zilla::Plugin::Keywords" : "0.004", "Dist::Zilla::Plugin::License" : "5.038", "Dist::Zilla::Plugin::MakeMaker::Fallback" : "0.012", "Dist::Zilla::Plugin::Manifest" : "0", "Dist::Zilla::Plugin::MetaConfig" : "0", "Dist::Zilla::Plugin::MetaJSON" : "0", "Dist::Zilla::Plugin::MetaNoIndex" : "0", "Dist::Zilla::Plugin::MetaProvides::Package" : "1.15000002", "Dist::Zilla::Plugin::MetaResources" : "0", "Dist::Zilla::Plugin::MetaTests" : "0", "Dist::Zilla::Plugin::MetaYAML" : "0", "Dist::Zilla::Plugin::MinimumPerl" : "1.006", "Dist::Zilla::Plugin::ModuleBuildTiny::Fallback" : "0.018", "Dist::Zilla::Plugin::MojibakeTests" : "0.8", "Dist::Zilla::Plugin::NextRelease" : "5.033", "Dist::Zilla::Plugin::PodCoverageTests" : "0", "Dist::Zilla::Plugin::PodSyntaxTests" : "0", "Dist::Zilla::Plugin::PodWeaver" : "4.005", "Dist::Zilla::Plugin::Prereqs" : "0", "Dist::Zilla::Plugin::Prereqs::AuthorDeps" : "0", "Dist::Zilla::Plugin::PromptIfStale" : "0", "Dist::Zilla::Plugin::Readme" : "0", "Dist::Zilla::Plugin::ReadmeAnyFromPod" : "0.142180", "Dist::Zilla::Plugin::RemovePrereqs" : "0", "Dist::Zilla::Plugin::RewriteVersion::Transitional" : "0.004", "Dist::Zilla::Plugin::Run::AfterBuild" : "0.038", "Dist::Zilla::Plugin::Run::AfterRelease" : "0.038", "Dist::Zilla::Plugin::RunExtraTests" : "0.024", "Dist::Zilla::Plugin::StaticInstall" : "0.005", "Dist::Zilla::Plugin::Test::CPAN::Changes" : "0.008", "Dist::Zilla::Plugin::Test::ChangesHasContent" : "0", "Dist::Zilla::Plugin::Test::CheckBreaks" : "0", "Dist::Zilla::Plugin::Test::CleanNamespaces" : "0.006", "Dist::Zilla::Plugin::Test::Compile" : "2.039", "Dist::Zilla::Plugin::Test::EOL" : "0.17", "Dist::Zilla::Plugin::Test::Kwalitee" : "2.06", "Dist::Zilla::Plugin::Test::MinimumVersion" : "2.000003", "Dist::Zilla::Plugin::Test::NoTabs" : "0.08", "Dist::Zilla::Plugin::Test::Portability" : "0", "Dist::Zilla::Plugin::Test::ReportPrereqs" : "0.019", "Dist::Zilla::Plugin::TestRelease" : "0", "Dist::Zilla::Plugin::UploadToCPAN" : "0", "Dist::Zilla::PluginBundle::Author::ETHER" : "0.101", "File::Spec" : "0", "IO::Handle" : "0", "IPC::Open3" : "0", "Pod::Coverage::TrustPod" : "0", "Software::License::Perl_5" : "0", "Test::CPAN::Changes" : "0.19", "Test::CPAN::Meta" : "0", "Test::CleanNamespaces" : "0.15", "Test::EOL" : "0", "Test::Kwalitee" : "1.21", "Test::Mojibake" : "0", "Test::More" : "0.96", "Test::NoTabs" : "0", "Test::Pod" : "1.41", "Test::Pod::Coverage" : "1.08", "blib" : "1.01", "perl" : "5.006" } }, "runtime" : { "requires" : { "File::Path" : "2.08", "Moose" : "0", "Moose::Role" : "0", "Moose::Util::TypeConstraints" : "0", "MooseX::Getopt" : "0", "MooseX::Getopt::OptionTypeMap" : "0", "MooseX::Types::Path::Class" : "0", "POSIX" : "0", "Sub::Exporter" : "0", "Test::Builder" : "0", "namespace::autoclean" : "0", "perl" : "5.008003", "strict" : "0", "warnings" : "0" } }, "test" : { "recommends" : { "CPAN::Meta" : "2.120900" }, "requires" : { "ExtUtils::MakeMaker" : "0", "File::Spec" : "0", "File::Spec::Functions" : "0", "File::Temp" : "0", "Test::Fatal" : "0", "Test::Moose" : "0", "Test::More" : "0.88", "constant" : "0", "perl" : "5.008003" } } }, "provides" : { "MooseX::Daemonize" : { "file" : "lib/MooseX/Daemonize.pm", "version" : "0.20" }, "MooseX::Daemonize::Core" : { "file" : "lib/MooseX/Daemonize/Core.pm", "version" : "0.20" }, "MooseX::Daemonize::Pid" : { "file" : "lib/MooseX/Daemonize/Pid.pm", "version" : "0.20" }, "MooseX::Daemonize::Pid::File" : { "file" : "lib/MooseX/Daemonize/Pid/File.pm", "version" : "0.20" }, "MooseX::Daemonize::WithPidFile" : { "file" : "lib/MooseX/Daemonize/WithPidFile.pm", "version" : "0.20" }, "Test::MooseX::Daemonize" : { "file" : "lib/Test/MooseX/Daemonize.pm", "version" : "0.20" }, "Test::MooseX::Daemonize::Testable" : { "file" : "lib/Test/MooseX/Daemonize.pm" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "mailto" : "bug-MooseX-Daemonize@rt.cpan.org", "web" : "https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Daemonize" }, "homepage" : "https://github.com/moose/MooseX-Daemonize", "repository" : { "type" : "git", "url" : "https://github.com/moose/MooseX-Daemonize.git", "web" : "https://github.com/moose/MooseX-Daemonize" }, "x_IRC" : "irc://irc.perl.org/#moose", "x_MailingList" : "http://lists.perl.org/list/moose.html" }, "version" : "0.20", "x_Dist_Zilla" : { "perl" : { "version" : "5.023001" }, "plugins" : [ { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "requires" } }, "name" : "@Author::ETHER/bundle_plugins", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::RewriteVersion::Transitional", "config" : { "Dist::Zilla::Plugin::RewriteVersion" : { "add_tarball_name" : 0, "finders" : [ ":ExecFiles", ":InstallModules" ], "global" : 1, "skip_version_provider" : 0 }, "Dist::Zilla::Plugin::RewriteVersion::Transitional" : {} }, "name" : "@Author::ETHER/RewriteVersion::Transitional", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::PromptIfStale", "config" : { "Dist::Zilla::Plugin::PromptIfStale" : { "check_all_plugins" : 0, "check_all_prereqs" : 0, "modules" : [ "Dist::Zilla::PluginBundle::Author::ETHER" ], "phase" : "build", "skip" : [] } }, "name" : "@Author::ETHER/stale modules, build", "version" : "0.045" }, { "class" : "Dist::Zilla::Plugin::PromptIfStale", "config" : { "Dist::Zilla::Plugin::PromptIfStale" : { "check_all_plugins" : "1", "check_all_prereqs" : "1", "modules" : [], "phase" : "release", "skip" : [] } }, "name" : "@Author::ETHER/stale modules, release", "version" : "0.045" }, { "class" : "Dist::Zilla::Plugin::FileFinder::ByName", "name" : "@Author::ETHER/Examples", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::FileFinder::ByName", "name" : "@Author::ETHER/ExtraTestFiles", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::Git::GatherDir", "config" : { "Dist::Zilla::Plugin::GatherDir" : { "exclude_filename" : [ "CONTRIBUTING", "LICENSE", "README.md" ], "exclude_match" : [], "follow_symlinks" : 0, "include_dotfiles" : 0, "prefix" : "", "prune_directory" : [], "root" : "." }, "Dist::Zilla::Plugin::Git::GatherDir" : { "include_untracked" : 0 } }, "name" : "@Author::ETHER/Git::GatherDir", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "@Author::ETHER/MetaYAML", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "@Author::ETHER/MetaJSON", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::Readme", "name" : "@Author::ETHER/Readme", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@Author::ETHER/Manifest", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "@Author::ETHER/License", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::GenerateFile::ShareDir", "config" : { "Dist::Zilla::Plugin::GenerateFile::ShareDir" : { "destination_filename" : "CONTRIBUTING", "dist" : "Dist-Zilla-PluginBundle-Author-ETHER", "encoding" : "UTF-8", "has_xs" : 0, "location" : "build", "source_filename" : "CONTRIBUTING" } }, "name" : "@Author::ETHER/generate CONTRIBUTING", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::InstallGuide", "name" : "@Author::ETHER/InstallGuide", "version" : "1.200006" }, { "class" : "Dist::Zilla::Plugin::Test::Compile", "config" : { "Dist::Zilla::Plugin::Test::Compile" : { "bail_out_on_fail" : "1", "fail_on_warning" : "author", "fake_home" : 0, "filename" : "xt/author/00-compile.t", "module_finder" : [ ":InstallModules" ], "needs_display" : 0, "phase" : "develop", "script_finder" : [ ":PerlExecFiles", "@Author::ETHER/Examples" ], "skips" : [] } }, "name" : "@Author::ETHER/Test::Compile", "version" : "2.054" }, { "class" : "Dist::Zilla::Plugin::Test::NoTabs", "config" : { "Dist::Zilla::Plugin::Test::NoTabs" : { "filename" : "xt/author/no-tabs.t", "finder" : [ ":InstallModules", ":ExecFiles", "@Author::ETHER/Examples", ":TestFiles", "@Author::ETHER/ExtraTestFiles" ] } }, "name" : "@Author::ETHER/Test::NoTabs", "version" : "0.15" }, { "class" : "Dist::Zilla::Plugin::Test::EOL", "config" : { "Dist::Zilla::Plugin::Test::EOL" : { "filename" : "xt/author/eol.t", "finder" : [ ":InstallModules", ":ExecFiles", "@Author::ETHER/Examples", ":TestFiles", "@Author::ETHER/ExtraTestFiles" ], "trailing_whitespace" : "1" } }, "name" : "@Author::ETHER/Test::EOL", "version" : "0.18" }, { "class" : "Dist::Zilla::Plugin::MetaTests", "name" : "@Author::ETHER/MetaTests", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::Test::CPAN::Changes", "name" : "@Author::ETHER/Test::CPAN::Changes", "version" : "0.009" }, { "class" : "Dist::Zilla::Plugin::Test::ChangesHasContent", "name" : "@Author::ETHER/Test::ChangesHasContent", "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::Test::MinimumVersion", "name" : "@Author::ETHER/Test::MinimumVersion", "version" : "2.000006" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "@Author::ETHER/PodSyntaxTests", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::PodCoverageTests", "name" : "@Author::ETHER/PodCoverageTests", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::Test::Kwalitee", "config" : { "Dist::Zilla::Plugin::Test::Kwalitee" : { "filename" : "xt/author/kwalitee.t", "skiptest" : [] } }, "name" : "@Author::ETHER/Test::Kwalitee", "version" : "2.11" }, { "class" : "Dist::Zilla::Plugin::MojibakeTests", "name" : "@Author::ETHER/MojibakeTests", "version" : "0.8" }, { "class" : "Dist::Zilla::Plugin::Test::ReportPrereqs", "name" : "@Author::ETHER/Test::ReportPrereqs", "version" : "0.021" }, { "class" : "Dist::Zilla::Plugin::Test::Portability", "name" : "@Author::ETHER/Test::Portability", "version" : "2.000006" }, { "class" : "Dist::Zilla::Plugin::Test::CleanNamespaces", "config" : { "Dist::Zilla::Plugin::Test::CleanNamespaces" : { "filename" : "xt/author/clean-namespaces.t", "skips" : [] } }, "name" : "@Author::ETHER/Test::CleanNamespaces", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::Git::Describe", "name" : "@Author::ETHER/Git::Describe", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::PodWeaver", "config" : { "Dist::Zilla::Plugin::PodWeaver" : { "finder" : [ ":InstallModules", ":ExecFiles" ], "plugins" : [ { "class" : "Pod::Weaver::Plugin::EnsurePod5", "name" : "@CorePrep/EnsurePod5", "version" : "4.012" }, { "class" : "Pod::Weaver::Plugin::H1Nester", "name" : "@CorePrep/H1Nester", "version" : "4.012" }, { "class" : "Pod::Weaver::Plugin::SingleEncoding", "name" : "@Author::ETHER/SingleEncoding", "version" : "4.012" }, { "class" : "Pod::Weaver::Plugin::Transformer", "name" : "@Author::ETHER/List", "version" : "4.012" }, { "class" : "Pod::Weaver::Plugin::Transformer", "name" : "@Author::ETHER/Verbatim", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@Author::ETHER/header", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Name", "name" : "@Author::ETHER/Name", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Version", "name" : "@Author::ETHER/Version", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@Author::ETHER/prelude", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "SYNOPSIS", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "DESCRIPTION", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "OVERVIEW", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "ATTRIBUTES", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "METHODS", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "FUNCTIONS", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "TYPES", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Leftovers", "name" : "@Author::ETHER/Leftovers", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@Author::ETHER/postlude", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Authors", "name" : "@Author::ETHER/Authors", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Contributors", "name" : "@Author::ETHER/Contributors", "version" : "0.009" }, { "class" : "Pod::Weaver::Section::Legal", "name" : "@Author::ETHER/Legal", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@Author::ETHER/footer", "version" : "4.012" }, { "class" : "Pod::Weaver::Section::AllowOverride", "name" : "OverrideAuthors", "version" : "0.05" }, { "class" : "Pod::Weaver::Section::AllowOverride", "name" : "OverrideLegal", "version" : "0.05" } ] } }, "name" : "@Author::ETHER/PodWeaver", "version" : "4.006" }, { "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", "config" : { "Dist::Zilla::Role::FileWatcher" : { "version" : "0.006" } }, "name" : "@Author::ETHER/ReadmeAnyFromPod", "version" : "0.150250" }, { "class" : "Dist::Zilla::Plugin::GithubMeta", "name" : "@Author::ETHER/GithubMeta", "version" : "0.54" }, { "class" : "Dist::Zilla::Plugin::AutoMetaResources", "name" : "@Author::ETHER/AutoMetaResources", "version" : "1.21" }, { "class" : "Dist::Zilla::Plugin::AuthorityFromModule", "config" : { "Dist::Zilla::Plugin::AuthorityFromModule" : { "module" : "MooseX::Daemonize" }, "Dist::Zilla::Role::ModuleMetadata" : { "Module::Metadata" : "1.000027", "version" : "0.003" } }, "name" : "@Author::ETHER/AuthorityFromModule", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::Authority", "name" : "@Author::ETHER/Authority", "version" : "1.009" }, { "class" : "Dist::Zilla::Plugin::MetaNoIndex", "name" : "@Author::ETHER/MetaNoIndex", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::MetaProvides::Package", "config" : { "Dist::Zilla::Plugin::MetaProvides::Package" : { "finder" : [ ":InstallModules" ], "finder_objects" : [ { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "5.039" } ] }, "Dist::Zilla::Role::MetaProvider::Provider" : { "inherit_missing" : "0", "inherit_version" : "0", "meta_noindex" : "1" } }, "name" : "@Author::ETHER/MetaProvides::Package", "version" : "2.003001" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "@Author::ETHER/MetaConfig", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::Keywords", "config" : { "Dist::Zilla::Plugin::Keywords" : { "keywords" : [] } }, "name" : "@Author::ETHER/Keywords", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::Git::Contributors", "config" : { "Dist::Zilla::Plugin::Git::Contributors" : { "include_authors" : 0, "include_releaser" : 1, "order_by" : "commits", "paths" : [ "." ] } }, "name" : "@Author::ETHER/Git::Contributors", "version" : "0.014" }, { "class" : "Dist::Zilla::Plugin::AutoPrereqs", "name" : "@Author::ETHER/AutoPrereqs", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::Prereqs::AuthorDeps", "name" : "@Author::ETHER/Prereqs::AuthorDeps", "version" : "0.005" }, { "class" : "Dist::Zilla::Plugin::MinimumPerl", "name" : "@Author::ETHER/MinimumPerl", "version" : "1.006" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "recommends" } }, "name" : "@Author::ETHER/pluginbundle_version", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::MakeMaker::Fallback", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 9 } }, "name" : "@Author::ETHER/MakeMaker::Fallback", "version" : "0.019" }, { "class" : "Dist::Zilla::Plugin::ModuleBuildTiny::Fallback", "config" : { "Dist::Zilla::Plugin::ModuleBuildTiny::Fallback" : { "mb_version" : "0.28", "plugins" : [ { "class" : "Dist::Zilla::Plugin::ModuleBuild", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 9 } }, "name" : "ModuleBuild, via ModuleBuildTiny::Fallback", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::ModuleBuildTiny", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 9 } }, "name" : "ModuleBuildTiny, via ModuleBuildTiny::Fallback", "version" : "0.013" } ] }, "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 9 } }, "name" : "@Author::ETHER/ModuleBuildTiny::Fallback", "version" : "0.018" }, { "class" : "Dist::Zilla::Plugin::StaticInstall", "config" : { "Dist::Zilla::Plugin::StaticInstall" : { "dry_run" : 0, "mode" : "auto" } }, "name" : "@Author::ETHER/StaticInstall", "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::RunExtraTests", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 9 } }, "name" : "@Author::ETHER/RunExtraTests", "version" : "0.028" }, { "class" : "Dist::Zilla::Plugin::CheckSelfDependency", "config" : { "Dist::Zilla::Plugin::CheckSelfDependency" : { "finder" : [ ":InstallModules" ] }, "Dist::Zilla::Role::ModuleMetadata" : { "Module::Metadata" : "1.000027", "version" : "0.003" } }, "name" : "@Author::ETHER/CheckSelfDependency", "version" : "0.011" }, { "class" : "Dist::Zilla::Plugin::Run::AfterBuild", "config" : { "Dist::Zilla::Plugin::Run::Role::Runner" : { "fatal_errors" : 1, "quiet" : 1, "run" : [ "bash -c \"test -e .ackrc && grep -q -- '--ignore-dir=.latest' .ackrc || echo '--ignore-dir=.latest' >> .ackrc; if [[ `dirname '%d'` != .build ]]; then test -e .ackrc && grep -q -- '--ignore-dir=%d' .ackrc || echo '--ignore-dir=%d' >> .ackrc; fi\"" ] } }, "name" : "@Author::ETHER/.ackrc", "version" : "0.042" }, { "class" : "Dist::Zilla::Plugin::Run::AfterBuild", "config" : { "Dist::Zilla::Plugin::Run::Role::Runner" : { "eval" : [ "if ('%d' =~ /^%n-[.[:xdigit:]]+$/) { unlink '.latest'; symlink '%d', '.latest'; }" ], "fatal_errors" : 1, "quiet" : 1 } }, "name" : "@Author::ETHER/.latest", "version" : "0.042" }, { "class" : "Dist::Zilla::Plugin::CheckStrictVersion", "name" : "@Author::ETHER/CheckStrictVersion", "version" : "0.001" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "config" : { "Dist::Zilla::Plugin::Git::Check" : { "untracked_files" : "die" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@Author::ETHER/initial check", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts", "config" : { "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@Author::ETHER/Git::CheckFor::MergeConflicts", "version" : "0.013" }, { "class" : "Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch", "config" : { "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@Author::ETHER/Git::CheckFor::CorrectBranch", "version" : "0.013" }, { "class" : "Dist::Zilla::Plugin::Git::Remote::Check", "name" : "@Author::ETHER/Git::Remote::Check", "version" : "0.2.0" }, { "class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed", "name" : "@Author::ETHER/CheckPrereqsIndexed", "version" : "0.016" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "@Author::ETHER/TestRelease", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "config" : { "Dist::Zilla::Plugin::Git::Check" : { "untracked_files" : "die" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@Author::ETHER/after tests", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::CheckIssues", "name" : "@Author::ETHER/CheckIssues", "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@Author::ETHER/UploadToCPAN", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::Run::AfterRelease", "config" : { "Dist::Zilla::Plugin::Run::Role::Runner" : { "eval" : [ "unlink 'LICENSE'" ], "fatal_errors" : 1, "quiet" : 1 } }, "name" : "@Author::ETHER/remove old LICENSE", "version" : "0.042" }, { "class" : "Dist::Zilla::Plugin::Run::AfterRelease", "config" : { "Dist::Zilla::Plugin::Run::Role::Runner" : { "eval" : [ "unlink 'README.md'" ], "fatal_errors" : 1, "quiet" : 1 } }, "name" : "@Author::ETHER/remove old READMEs", "version" : "0.042" }, { "class" : "Dist::Zilla::Plugin::CopyFilesFromRelease", "config" : { "Dist::Zilla::Plugin::CopyFilesFromRelease" : { "filename" : [ "CONTRIBUTING", "Changes", "INSTALL", "LICENCE", "LICENSE", "ppport.h" ], "match" : [] } }, "name" : "@Author::ETHER/CopyFilesFromRelease", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "config" : { "Dist::Zilla::Plugin::Git::Commit" : { "add_files_in" : [ "." ], "commit_msg" : "%N-%v%t%n%n%c" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "CONTRIBUTING", "Changes", "LICENSE", "README.md" ], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@Author::ETHER/release snapshot", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", "config" : { "Dist::Zilla::Plugin::Git::Tag" : { "branch" : null, "changelog" : "Changes", "signed" : 0, "tag" : "v0.20", "tag_format" : "v%v", "tag_message" : "v%v%t" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@Author::ETHER/Git::Tag", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::GitHub::Update", "config" : { "Dist::Zilla::Plugin::GitHub::Update" : { "metacpan" : 1 } }, "name" : "@Author::ETHER/GitHub::Update", "version" : "0.41" }, { "class" : "Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional", "config" : { "Dist::Zilla::Plugin::BumpVersionAfterRelease" : { "finders" : [ ":ExecFiles", ":InstallModules" ], "global" : 1, "munge_makefile_pl" : 1 }, "Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional" : {} }, "name" : "@Author::ETHER/BumpVersionAfterRelease::Transitional", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::NextRelease", "name" : "@Author::ETHER/NextRelease", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "config" : { "Dist::Zilla::Plugin::Git::Commit" : { "add_files_in" : [], "commit_msg" : "increment $VERSION after %v release" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "Changes" ], "allow_dirty_match" : [ "(?^:^lib/.*\\.pm$)" ], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@Author::ETHER/post-release commit", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::Git::Push", "config" : { "Dist::Zilla::Plugin::Git::Push" : { "push_to" : [ "origin" ], "remotes_must_exist" : 1 }, "Dist::Zilla::Role::Git::Repo" : { "repo_root" : "." } }, "name" : "@Author::ETHER/Git::Push", "version" : "2.036" }, { "class" : "Dist::Zilla::Plugin::Run::AfterRelease", "config" : { "Dist::Zilla::Plugin::Run::Role::Runner" : { "fatal_errors" : 0, "quiet" : 0, "run" : [ "REDACTED" ] } }, "name" : "@Author::ETHER/install release", "version" : "0.042" }, { "class" : "Dist::Zilla::Plugin::Run::AfterRelease", "config" : { "Dist::Zilla::Plugin::Run::Role::Runner" : { "eval" : [ "print \"release complete!\\xa\"" ], "fatal_errors" : 1, "quiet" : 1 } }, "name" : "@Author::ETHER/release complete", "version" : "0.042" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "@Author::ETHER/ConfirmRelease", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "runtime", "type" : "requires" } }, "name" : "RuntimeRequires", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::RemovePrereqs", "config" : { "Dist::Zilla::Plugin::RemovePrereqs" : { "modules_to_remove" : [ "Test::MooseX::Daemonize::Testable" ] } }, "name" : "RemovePrereqs", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::MetaResources", "name" : "MetaResources", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::AssertOS", "name" : "AssertOS", "version" : "0.06" }, { "class" : "Dist::Zilla::Plugin::Test::CheckBreaks", "config" : { "Dist::Zilla::Plugin::Test::CheckBreaks" : { "conflicts_module" : "Moose::Conflicts" }, "Dist::Zilla::Role::ModuleMetadata" : { "Module::Metadata" : "1.000027", "version" : "0.003" } }, "name" : "Test::CheckBreaks", "version" : "0.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExtraTestFiles", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":PerlExecFiles", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":AllFiles", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":NoFiles", "version" : "5.039" }, { "class" : "Dist::Zilla::Plugin::VerifyPhases", "name" : "@Author::ETHER/PHASE VERIFICATION", "version" : "0.013" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : "0" }, "version" : "5.039" } }, "x_authority" : "cpan:PERIGRIN", "x_authority_from_module" : "MooseX::Daemonize", "x_contributors" : [ "Karen Etheridge ", "Michael Reddick ", "Yuval Kogman ", "Ash Berlin ", "Brandon L Black ", "David Steinbrunner ", "Dave Rolsky ", "Chisel Wright " ], "x_permissions_from_module" : "MooseX::Daemonize", "x_static_install" : 0 } MooseX-Daemonize-0.20/META.yml000644 000766 000024 00000063433 12564001461 016312 0ustar00etherstaff000000 000000 --- abstract: 'Role for daemonizing your Moose based application' author: - 'Stevan Little ' - 'Chris Prather ' build_requires: ExtUtils::MakeMaker: '0' File::Spec: '0' File::Spec::Functions: '0' File::Temp: '0' Test::Fatal: '0' Test::Moose: '0' Test::More: '0.88' constant: '0' perl: '5.008003' configure_requires: Devel::AssertOS: '0' Devel::CheckOS: '1.63' Module::Build::Tiny: '0.007' perl: '5.006' dynamic_config: 0 generated_by: 'Dist::Zilla version 5.039, CPAN::Meta::Converter version 2.150005' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: MooseX-Daemonize no_index: directory: - t - xt - examples - inc provides: MooseX::Daemonize: file: lib/MooseX/Daemonize.pm version: '0.20' MooseX::Daemonize::Core: file: lib/MooseX/Daemonize/Core.pm version: '0.20' MooseX::Daemonize::Pid: file: lib/MooseX/Daemonize/Pid.pm version: '0.20' MooseX::Daemonize::Pid::File: file: lib/MooseX/Daemonize/Pid/File.pm version: '0.20' MooseX::Daemonize::WithPidFile: file: lib/MooseX/Daemonize/WithPidFile.pm version: '0.20' Test::MooseX::Daemonize: file: lib/Test/MooseX/Daemonize.pm version: '0.20' Test::MooseX::Daemonize::Testable: file: lib/Test/MooseX/Daemonize.pm requires: File::Path: '2.08' Moose: '0' Moose::Role: '0' Moose::Util::TypeConstraints: '0' MooseX::Getopt: '0' MooseX::Getopt::OptionTypeMap: '0' MooseX::Types::Path::Class: '0' POSIX: '0' Sub::Exporter: '0' Test::Builder: '0' namespace::autoclean: '0' perl: '5.008003' strict: '0' warnings: '0' resources: IRC: irc://irc.perl.org/#moose MailingList: http://lists.perl.org/list/moose.html bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Daemonize homepage: https://github.com/moose/MooseX-Daemonize repository: https://github.com/moose/MooseX-Daemonize.git version: '0.20' x_Dist_Zilla: perl: version: '5.023001' plugins: - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: requires name: '@Author::ETHER/bundle_plugins' version: '5.039' - class: Dist::Zilla::Plugin::RewriteVersion::Transitional config: Dist::Zilla::Plugin::RewriteVersion: add_tarball_name: 0 finders: - ':ExecFiles' - ':InstallModules' global: 1 skip_version_provider: 0 Dist::Zilla::Plugin::RewriteVersion::Transitional: {} name: '@Author::ETHER/RewriteVersion::Transitional' version: '0.007' - class: Dist::Zilla::Plugin::PromptIfStale config: Dist::Zilla::Plugin::PromptIfStale: check_all_plugins: 0 check_all_prereqs: 0 modules: - Dist::Zilla::PluginBundle::Author::ETHER phase: build skip: [] name: '@Author::ETHER/stale modules, build' version: '0.045' - class: Dist::Zilla::Plugin::PromptIfStale config: Dist::Zilla::Plugin::PromptIfStale: check_all_plugins: '1' check_all_prereqs: '1' modules: [] phase: release skip: [] name: '@Author::ETHER/stale modules, release' version: '0.045' - class: Dist::Zilla::Plugin::FileFinder::ByName name: '@Author::ETHER/Examples' version: '5.039' - class: Dist::Zilla::Plugin::FileFinder::ByName name: '@Author::ETHER/ExtraTestFiles' version: '5.039' - class: Dist::Zilla::Plugin::Git::GatherDir config: Dist::Zilla::Plugin::GatherDir: exclude_filename: - CONTRIBUTING - LICENSE - README.md exclude_match: [] follow_symlinks: 0 include_dotfiles: 0 prefix: '' prune_directory: [] root: . Dist::Zilla::Plugin::Git::GatherDir: include_untracked: 0 name: '@Author::ETHER/Git::GatherDir' version: '2.036' - class: Dist::Zilla::Plugin::MetaYAML name: '@Author::ETHER/MetaYAML' version: '5.039' - class: Dist::Zilla::Plugin::MetaJSON name: '@Author::ETHER/MetaJSON' version: '5.039' - class: Dist::Zilla::Plugin::Readme name: '@Author::ETHER/Readme' version: '5.039' - class: Dist::Zilla::Plugin::Manifest name: '@Author::ETHER/Manifest' version: '5.039' - class: Dist::Zilla::Plugin::License name: '@Author::ETHER/License' version: '5.039' - class: Dist::Zilla::Plugin::GenerateFile::ShareDir config: Dist::Zilla::Plugin::GenerateFile::ShareDir: destination_filename: CONTRIBUTING dist: Dist-Zilla-PluginBundle-Author-ETHER encoding: UTF-8 has_xs: 0 location: build source_filename: CONTRIBUTING name: '@Author::ETHER/generate CONTRIBUTING' version: '0.006' - class: Dist::Zilla::Plugin::InstallGuide name: '@Author::ETHER/InstallGuide' version: '1.200006' - class: Dist::Zilla::Plugin::Test::Compile config: Dist::Zilla::Plugin::Test::Compile: bail_out_on_fail: '1' fail_on_warning: author fake_home: 0 filename: xt/author/00-compile.t module_finder: - ':InstallModules' needs_display: 0 phase: develop script_finder: - ':PerlExecFiles' - '@Author::ETHER/Examples' skips: [] name: '@Author::ETHER/Test::Compile' version: '2.054' - class: Dist::Zilla::Plugin::Test::NoTabs config: Dist::Zilla::Plugin::Test::NoTabs: filename: xt/author/no-tabs.t finder: - ':InstallModules' - ':ExecFiles' - '@Author::ETHER/Examples' - ':TestFiles' - '@Author::ETHER/ExtraTestFiles' name: '@Author::ETHER/Test::NoTabs' version: '0.15' - class: Dist::Zilla::Plugin::Test::EOL config: Dist::Zilla::Plugin::Test::EOL: filename: xt/author/eol.t finder: - ':InstallModules' - ':ExecFiles' - '@Author::ETHER/Examples' - ':TestFiles' - '@Author::ETHER/ExtraTestFiles' trailing_whitespace: '1' name: '@Author::ETHER/Test::EOL' version: '0.18' - class: Dist::Zilla::Plugin::MetaTests name: '@Author::ETHER/MetaTests' version: '5.039' - class: Dist::Zilla::Plugin::Test::CPAN::Changes name: '@Author::ETHER/Test::CPAN::Changes' version: '0.009' - class: Dist::Zilla::Plugin::Test::ChangesHasContent name: '@Author::ETHER/Test::ChangesHasContent' version: '0.008' - class: Dist::Zilla::Plugin::Test::MinimumVersion name: '@Author::ETHER/Test::MinimumVersion' version: '2.000006' - class: Dist::Zilla::Plugin::PodSyntaxTests name: '@Author::ETHER/PodSyntaxTests' version: '5.039' - class: Dist::Zilla::Plugin::PodCoverageTests name: '@Author::ETHER/PodCoverageTests' version: '5.039' - class: Dist::Zilla::Plugin::Test::Kwalitee config: Dist::Zilla::Plugin::Test::Kwalitee: filename: xt/author/kwalitee.t skiptest: [] name: '@Author::ETHER/Test::Kwalitee' version: '2.11' - class: Dist::Zilla::Plugin::MojibakeTests name: '@Author::ETHER/MojibakeTests' version: '0.8' - class: Dist::Zilla::Plugin::Test::ReportPrereqs name: '@Author::ETHER/Test::ReportPrereqs' version: '0.021' - class: Dist::Zilla::Plugin::Test::Portability name: '@Author::ETHER/Test::Portability' version: '2.000006' - class: Dist::Zilla::Plugin::Test::CleanNamespaces config: Dist::Zilla::Plugin::Test::CleanNamespaces: filename: xt/author/clean-namespaces.t skips: [] name: '@Author::ETHER/Test::CleanNamespaces' version: '0.006' - class: Dist::Zilla::Plugin::Git::Describe name: '@Author::ETHER/Git::Describe' version: '0.006' - class: Dist::Zilla::Plugin::PodWeaver config: Dist::Zilla::Plugin::PodWeaver: finder: - ':InstallModules' - ':ExecFiles' plugins: - class: Pod::Weaver::Plugin::EnsurePod5 name: '@CorePrep/EnsurePod5' version: '4.012' - class: Pod::Weaver::Plugin::H1Nester name: '@CorePrep/H1Nester' version: '4.012' - class: Pod::Weaver::Plugin::SingleEncoding name: '@Author::ETHER/SingleEncoding' version: '4.012' - class: Pod::Weaver::Plugin::Transformer name: '@Author::ETHER/List' version: '4.012' - class: Pod::Weaver::Plugin::Transformer name: '@Author::ETHER/Verbatim' version: '4.012' - class: Pod::Weaver::Section::Region name: '@Author::ETHER/header' version: '4.012' - class: Pod::Weaver::Section::Name name: '@Author::ETHER/Name' version: '4.012' - class: Pod::Weaver::Section::Version name: '@Author::ETHER/Version' version: '4.012' - class: Pod::Weaver::Section::Region name: '@Author::ETHER/prelude' version: '4.012' - class: Pod::Weaver::Section::Generic name: SYNOPSIS version: '4.012' - class: Pod::Weaver::Section::Generic name: DESCRIPTION version: '4.012' - class: Pod::Weaver::Section::Generic name: OVERVIEW version: '4.012' - class: Pod::Weaver::Section::Collect name: ATTRIBUTES version: '4.012' - class: Pod::Weaver::Section::Collect name: METHODS version: '4.012' - class: Pod::Weaver::Section::Collect name: FUNCTIONS version: '4.012' - class: Pod::Weaver::Section::Collect name: TYPES version: '4.012' - class: Pod::Weaver::Section::Leftovers name: '@Author::ETHER/Leftovers' version: '4.012' - class: Pod::Weaver::Section::Region name: '@Author::ETHER/postlude' version: '4.012' - class: Pod::Weaver::Section::Authors name: '@Author::ETHER/Authors' version: '4.012' - class: Pod::Weaver::Section::Contributors name: '@Author::ETHER/Contributors' version: '0.009' - class: Pod::Weaver::Section::Legal name: '@Author::ETHER/Legal' version: '4.012' - class: Pod::Weaver::Section::Region name: '@Author::ETHER/footer' version: '4.012' - class: Pod::Weaver::Section::AllowOverride name: OverrideAuthors version: '0.05' - class: Pod::Weaver::Section::AllowOverride name: OverrideLegal version: '0.05' name: '@Author::ETHER/PodWeaver' version: '4.006' - class: Dist::Zilla::Plugin::ReadmeAnyFromPod config: Dist::Zilla::Role::FileWatcher: version: '0.006' name: '@Author::ETHER/ReadmeAnyFromPod' version: '0.150250' - class: Dist::Zilla::Plugin::GithubMeta name: '@Author::ETHER/GithubMeta' version: '0.54' - class: Dist::Zilla::Plugin::AutoMetaResources name: '@Author::ETHER/AutoMetaResources' version: '1.21' - class: Dist::Zilla::Plugin::AuthorityFromModule config: Dist::Zilla::Plugin::AuthorityFromModule: module: MooseX::Daemonize Dist::Zilla::Role::ModuleMetadata: Module::Metadata: '1.000027' version: '0.003' name: '@Author::ETHER/AuthorityFromModule' version: '0.006' - class: Dist::Zilla::Plugin::Authority name: '@Author::ETHER/Authority' version: '1.009' - class: Dist::Zilla::Plugin::MetaNoIndex name: '@Author::ETHER/MetaNoIndex' version: '5.039' - class: Dist::Zilla::Plugin::MetaProvides::Package config: Dist::Zilla::Plugin::MetaProvides::Package: finder: - ':InstallModules' finder_objects: - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: '5.039' Dist::Zilla::Role::MetaProvider::Provider: inherit_missing: '0' inherit_version: '0' meta_noindex: '1' name: '@Author::ETHER/MetaProvides::Package' version: '2.003001' - class: Dist::Zilla::Plugin::MetaConfig name: '@Author::ETHER/MetaConfig' version: '5.039' - class: Dist::Zilla::Plugin::Keywords config: Dist::Zilla::Plugin::Keywords: keywords: [] name: '@Author::ETHER/Keywords' version: '0.006' - class: Dist::Zilla::Plugin::Git::Contributors config: Dist::Zilla::Plugin::Git::Contributors: include_authors: 0 include_releaser: 1 order_by: commits paths: - . name: '@Author::ETHER/Git::Contributors' version: '0.014' - class: Dist::Zilla::Plugin::AutoPrereqs name: '@Author::ETHER/AutoPrereqs' version: '5.039' - class: Dist::Zilla::Plugin::Prereqs::AuthorDeps name: '@Author::ETHER/Prereqs::AuthorDeps' version: '0.005' - class: Dist::Zilla::Plugin::MinimumPerl name: '@Author::ETHER/MinimumPerl' version: '1.006' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: recommends name: '@Author::ETHER/pluginbundle_version' version: '5.039' - class: Dist::Zilla::Plugin::MakeMaker::Fallback config: Dist::Zilla::Role::TestRunner: default_jobs: 9 name: '@Author::ETHER/MakeMaker::Fallback' version: '0.019' - class: Dist::Zilla::Plugin::ModuleBuildTiny::Fallback config: Dist::Zilla::Plugin::ModuleBuildTiny::Fallback: mb_version: '0.28' plugins: - class: Dist::Zilla::Plugin::ModuleBuild config: Dist::Zilla::Role::TestRunner: default_jobs: 9 name: 'ModuleBuild, via ModuleBuildTiny::Fallback' version: '5.039' - class: Dist::Zilla::Plugin::ModuleBuildTiny config: Dist::Zilla::Role::TestRunner: default_jobs: 9 name: 'ModuleBuildTiny, via ModuleBuildTiny::Fallback' version: '0.013' Dist::Zilla::Role::TestRunner: default_jobs: 9 name: '@Author::ETHER/ModuleBuildTiny::Fallback' version: '0.018' - class: Dist::Zilla::Plugin::StaticInstall config: Dist::Zilla::Plugin::StaticInstall: dry_run: 0 mode: auto name: '@Author::ETHER/StaticInstall' version: '0.008' - class: Dist::Zilla::Plugin::RunExtraTests config: Dist::Zilla::Role::TestRunner: default_jobs: 9 name: '@Author::ETHER/RunExtraTests' version: '0.028' - class: Dist::Zilla::Plugin::CheckSelfDependency config: Dist::Zilla::Plugin::CheckSelfDependency: finder: - ':InstallModules' Dist::Zilla::Role::ModuleMetadata: Module::Metadata: '1.000027' version: '0.003' name: '@Author::ETHER/CheckSelfDependency' version: '0.011' - class: Dist::Zilla::Plugin::Run::AfterBuild config: Dist::Zilla::Plugin::Run::Role::Runner: fatal_errors: 1 quiet: 1 run: - "bash -c \"test -e .ackrc && grep -q -- '--ignore-dir=.latest' .ackrc || echo '--ignore-dir=.latest' >> .ackrc; if [[ `dirname '%d'` != .build ]]; then test -e .ackrc && grep -q -- '--ignore-dir=%d' .ackrc || echo '--ignore-dir=%d' >> .ackrc; fi\"" name: '@Author::ETHER/.ackrc' version: '0.042' - class: Dist::Zilla::Plugin::Run::AfterBuild config: Dist::Zilla::Plugin::Run::Role::Runner: eval: - "if ('%d' =~ /^%n-[.[:xdigit:]]+$/) { unlink '.latest'; symlink '%d', '.latest'; }" fatal_errors: 1 quiet: 1 name: '@Author::ETHER/.latest' version: '0.042' - class: Dist::Zilla::Plugin::CheckStrictVersion name: '@Author::ETHER/CheckStrictVersion' version: '0.001' - class: Dist::Zilla::Plugin::Git::Check config: Dist::Zilla::Plugin::Git::Check: untracked_files: die Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: [] allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: repo_root: . name: '@Author::ETHER/initial check' version: '2.036' - class: Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts config: Dist::Zilla::Role::Git::Repo: repo_root: . name: '@Author::ETHER/Git::CheckFor::MergeConflicts' version: '0.013' - class: Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch config: Dist::Zilla::Role::Git::Repo: repo_root: . name: '@Author::ETHER/Git::CheckFor::CorrectBranch' version: '0.013' - class: Dist::Zilla::Plugin::Git::Remote::Check name: '@Author::ETHER/Git::Remote::Check' version: 0.2.0 - class: Dist::Zilla::Plugin::CheckPrereqsIndexed name: '@Author::ETHER/CheckPrereqsIndexed' version: '0.016' - class: Dist::Zilla::Plugin::TestRelease name: '@Author::ETHER/TestRelease' version: '5.039' - class: Dist::Zilla::Plugin::Git::Check config: Dist::Zilla::Plugin::Git::Check: untracked_files: die Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: [] allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: repo_root: . name: '@Author::ETHER/after tests' version: '2.036' - class: Dist::Zilla::Plugin::CheckIssues name: '@Author::ETHER/CheckIssues' version: '0.008' - class: Dist::Zilla::Plugin::UploadToCPAN name: '@Author::ETHER/UploadToCPAN' version: '5.039' - class: Dist::Zilla::Plugin::Run::AfterRelease config: Dist::Zilla::Plugin::Run::Role::Runner: eval: - "unlink 'LICENSE'" fatal_errors: 1 quiet: 1 name: '@Author::ETHER/remove old LICENSE' version: '0.042' - class: Dist::Zilla::Plugin::Run::AfterRelease config: Dist::Zilla::Plugin::Run::Role::Runner: eval: - "unlink 'README.md'" fatal_errors: 1 quiet: 1 name: '@Author::ETHER/remove old READMEs' version: '0.042' - class: Dist::Zilla::Plugin::CopyFilesFromRelease config: Dist::Zilla::Plugin::CopyFilesFromRelease: filename: - CONTRIBUTING - Changes - INSTALL - LICENCE - LICENSE - ppport.h match: [] name: '@Author::ETHER/CopyFilesFromRelease' version: '0.006' - class: Dist::Zilla::Plugin::Git::Commit config: Dist::Zilla::Plugin::Git::Commit: add_files_in: - . commit_msg: '%N-%v%t%n%n%c' Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - CONTRIBUTING - Changes - LICENSE - README.md allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@Author::ETHER/release snapshot' version: '2.036' - class: Dist::Zilla::Plugin::Git::Tag config: Dist::Zilla::Plugin::Git::Tag: branch: ~ changelog: Changes signed: 0 tag: v0.20 tag_format: v%v tag_message: v%v%t Dist::Zilla::Role::Git::Repo: repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@Author::ETHER/Git::Tag' version: '2.036' - class: Dist::Zilla::Plugin::GitHub::Update config: Dist::Zilla::Plugin::GitHub::Update: metacpan: 1 name: '@Author::ETHER/GitHub::Update' version: '0.41' - class: Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional config: Dist::Zilla::Plugin::BumpVersionAfterRelease: finders: - ':ExecFiles' - ':InstallModules' global: 1 munge_makefile_pl: 1 Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional: {} name: '@Author::ETHER/BumpVersionAfterRelease::Transitional' version: '0.007' - class: Dist::Zilla::Plugin::NextRelease name: '@Author::ETHER/NextRelease' version: '5.039' - class: Dist::Zilla::Plugin::Git::Commit config: Dist::Zilla::Plugin::Git::Commit: add_files_in: [] commit_msg: 'increment $VERSION after %v release' Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - Changes allow_dirty_match: - (?^:^lib/.*\.pm$) changelog: Changes Dist::Zilla::Role::Git::Repo: repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@Author::ETHER/post-release commit' version: '2.036' - class: Dist::Zilla::Plugin::Git::Push config: Dist::Zilla::Plugin::Git::Push: push_to: - origin remotes_must_exist: 1 Dist::Zilla::Role::Git::Repo: repo_root: . name: '@Author::ETHER/Git::Push' version: '2.036' - class: Dist::Zilla::Plugin::Run::AfterRelease config: Dist::Zilla::Plugin::Run::Role::Runner: fatal_errors: 0 quiet: 0 run: - REDACTED name: '@Author::ETHER/install release' version: '0.042' - class: Dist::Zilla::Plugin::Run::AfterRelease config: Dist::Zilla::Plugin::Run::Role::Runner: eval: - 'print "release complete!\xa"' fatal_errors: 1 quiet: 1 name: '@Author::ETHER/release complete' version: '0.042' - class: Dist::Zilla::Plugin::ConfirmRelease name: '@Author::ETHER/ConfirmRelease' version: '5.039' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: runtime type: requires name: RuntimeRequires version: '5.039' - class: Dist::Zilla::Plugin::RemovePrereqs config: Dist::Zilla::Plugin::RemovePrereqs: modules_to_remove: - Test::MooseX::Daemonize::Testable name: RemovePrereqs version: '5.039' - class: Dist::Zilla::Plugin::MetaResources name: MetaResources version: '5.039' - class: Dist::Zilla::Plugin::AssertOS name: AssertOS version: '0.06' - class: Dist::Zilla::Plugin::Test::CheckBreaks config: Dist::Zilla::Plugin::Test::CheckBreaks: conflicts_module: Moose::Conflicts Dist::Zilla::Role::ModuleMetadata: Module::Metadata: '1.000027' version: '0.003' name: Test::CheckBreaks version: '0.012' - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: '5.039' - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: '5.039' - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: '5.039' - class: Dist::Zilla::Plugin::FinderCode name: ':ExtraTestFiles' version: '5.039' - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: '5.039' - class: Dist::Zilla::Plugin::FinderCode name: ':PerlExecFiles' version: '5.039' - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: '5.039' - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: '5.039' - class: Dist::Zilla::Plugin::FinderCode name: ':AllFiles' version: '5.039' - class: Dist::Zilla::Plugin::FinderCode name: ':NoFiles' version: '5.039' - class: Dist::Zilla::Plugin::VerifyPhases name: '@Author::ETHER/PHASE VERIFICATION' version: '0.013' zilla: class: Dist::Zilla::Dist::Builder config: is_trial: '0' version: '5.039' x_authority: cpan:PERIGRIN x_authority_from_module: MooseX::Daemonize x_contributors: - 'Karen Etheridge ' - 'Michael Reddick ' - 'Yuval Kogman ' - 'Ash Berlin ' - 'Brandon L Black ' - 'David Steinbrunner ' - 'Dave Rolsky ' - 'Chisel Wright ' x_permissions_from_module: MooseX::Daemonize x_static_install: 0 MooseX-Daemonize-0.20/README000644 000766 000024 00000000606 12564001461 015712 0ustar00etherstaff000000 000000 This archive contains the distribution MooseX-Daemonize, version 0.20: Role for daemonizing your Moose based application This software is copyright (c) 2007 by Chris Prather. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. This README file was generated by Dist::Zilla::Plugin::Readme v5.039. MooseX-Daemonize-0.20/t/000700 000766 000024 00000000000 12564001461 015261 5ustar00etherstaff000000 000000 MooseX-Daemonize-0.20/weaver.ini000600 000766 000024 00000000251 12564001461 017010 0ustar00etherstaff000000 000000 [@Author::ETHER] [AllowOverride / OverrideAuthors] header_re = ^AUTHORS?$ match_anywhere = 1 [AllowOverride / OverrideLegal] header_re = ^COPYRIGHT match_anywhere = 1 MooseX-Daemonize-0.20/xt/000700 000766 000024 00000000000 12564001461 015451 5ustar00etherstaff000000 000000 MooseX-Daemonize-0.20/xt/author/000700 000766 000024 00000000000 12564001461 016753 5ustar00etherstaff000000 000000 MooseX-Daemonize-0.20/xt/release/000700 000766 000024 00000000000 12564001461 017071 5ustar00etherstaff000000 000000 MooseX-Daemonize-0.20/xt/release/changes_has_content.t000644 000766 000024 00000002010 12564001461 023256 0ustar00etherstaff000000 000000 #!perl use Test::More tests => 2; note 'Checking Changes'; my $changes_file = 'Changes'; my $newver = '0.20'; my $trial_token = '-TRIAL'; SKIP: { ok(-e $changes_file, "$changes_file file exists") or skip 'Changes is missing', 1; ok(_get_changes($newver), "$changes_file has content for $newver"); } done_testing; # _get_changes copied and adapted from Dist::Zilla::Plugin::Git::Commit # by Jerome Quelin sub _get_changes { my $newver = shift; # parse changelog to find commit message open(my $fh, '<', $changes_file) or die "cannot open $changes_file: $!"; my $changelog = join('', <$fh>); close $fh; my @content = grep { /^$newver(?:$trial_token)?(?:\s+|$)/ ... /^\S/ } # from newver to un-indented split /\n/, $changelog; shift @content; # drop the version line # drop unindented last line and trailing blank lines pop @content while ( @content && $content[-1] =~ /^(?:\S|\s*$)/ ); # return number of non-blank lines return scalar @content; } MooseX-Daemonize-0.20/xt/release/cpan-changes.t000644 000766 000024 00000000263 12564001461 021620 0ustar00etherstaff000000 000000 #!perl use strict; use warnings; use Test::More 0.96 tests => 2; use_ok('Test::CPAN::Changes'); subtest 'changes_ok' => sub { changes_file_ok('Changes'); }; done_testing(); MooseX-Daemonize-0.20/xt/release/distmeta.t000644 000766 000024 00000000172 12564001461 021102 0ustar00etherstaff000000 000000 #!perl # This file was automatically generated by Dist::Zilla::Plugin::MetaTests. use Test::CPAN::Meta; meta_yaml_ok(); MooseX-Daemonize-0.20/xt/release/minimum-version.t000644 000766 000024 00000000271 12564001461 022426 0ustar00etherstaff000000 000000 #!perl use Test::More; eval "use Test::MinimumVersion"; plan skip_all => "Test::MinimumVersion required for testing minimum versions" if $@; all_minimum_version_ok( qq{5.008003} ); MooseX-Daemonize-0.20/xt/release/pod-coverage.t000644 000766 000024 00000000334 12564001461 021643 0ustar00etherstaff000000 000000 #!perl # This file was automatically generated by Dist::Zilla::Plugin::PodCoverageTests. use Test::Pod::Coverage 1.08; use Pod::Coverage::TrustPod; all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' }); MooseX-Daemonize-0.20/xt/release/pod-syntax.t000644 000766 000024 00000000220 12564001461 021370 0ustar00etherstaff000000 000000 #!perl # This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. use Test::More; use Test::Pod 1.41; all_pod_files_ok(); MooseX-Daemonize-0.20/xt/release/portability.t000644 000766 000024 00000000277 12564001461 021640 0ustar00etherstaff000000 000000 #!perl use strict; use warnings; use Test::More; eval 'use Test::Portability::Files'; plan skip_all => 'Test::Portability::Files required for testing portability' if $@; run_tests(); MooseX-Daemonize-0.20/xt/author/00-compile.t000644 000766 000024 00000004512 12564001461 021021 0ustar00etherstaff000000 000000 use 5.006; use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::Compile 2.054 use Test::More 0.94; plan tests => 8; my @module_files = ( 'MooseX/Daemonize.pm', 'MooseX/Daemonize/Core.pm', 'MooseX/Daemonize/Pid.pm', 'MooseX/Daemonize/Pid/File.pm', 'MooseX/Daemonize/WithPidFile.pm', 'Test/MooseX/Daemonize.pm' ); my @scripts = ( 'examples/moose_room.pl' ); # no fake home requested my $inc_switch = -d 'blib' ? '-Mblib' : '-Ilib'; use File::Spec; use IPC::Open3; use IO::Handle; open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!"; my @warnings; for my $lib (@module_files) { # see L my $stderr = IO::Handle->new; my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, '-e', "require q[$lib]"); binmode $stderr, ':crlf' if $^O eq 'MSWin32'; my @_warnings = <$stderr>; waitpid($pid, 0); is($?, 0, "$lib loaded ok"); shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/ and not eval { require blib; blib->VERSION('1.01') }; if (@_warnings) { warn @_warnings; push @warnings, @_warnings; } } foreach my $file (@scripts) { SKIP: { open my $fh, '<', $file or warn("Unable to open $file: $!"), next; my $line = <$fh>; close $fh and skip("$file isn't perl", 1) unless $line =~ /^#!\s*(?:\S*perl\S*)((?:\s+-\w*)*)(?:\s*#.*)?$/; my @flags = $1 ? split(' ', $1) : (); my $stderr = IO::Handle->new; my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, @flags, '-c', $file); binmode $stderr, ':crlf' if $^O eq 'MSWin32'; my @_warnings = <$stderr>; waitpid($pid, 0); is($?, 0, "$file compiled ok"); shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/ and not eval { require blib; blib->VERSION('1.01') }; # in older perls, -c output is simply the file portion of the path being tested if (@_warnings = grep { !/\bsyntax OK$/ } grep { chomp; $_ ne (File::Spec->splitpath($file))[2] } @_warnings) { warn @_warnings; push @warnings, @_warnings; } } } is(scalar(@warnings), 0, 'no warnings found') or diag 'got warnings: ', explain(\@warnings); BAIL_OUT("Compilation problems") if !Test::More->builder->is_passing; MooseX-Daemonize-0.20/xt/author/clean-namespaces.t000644 000766 000024 00000000361 12564001461 022351 0ustar00etherstaff000000 000000 use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::CleanNamespaces 0.006 use Test::More 0.94; use Test::CleanNamespaces 0.15; subtest all_namespaces_clean => sub { all_namespaces_clean() }; done_testing; MooseX-Daemonize-0.20/xt/author/eol.t000644 000766 000024 00000002156 12564001461 017735 0ustar00etherstaff000000 000000 use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::EOL 0.18 use Test::More 0.88; use Test::EOL; my @files = ( 'examples/moose_room.pl', 'lib/MooseX/Daemonize.pm', 'lib/MooseX/Daemonize/Core.pm', 'lib/MooseX/Daemonize/Pid.pm', 'lib/MooseX/Daemonize/Pid/File.pm', 'lib/MooseX/Daemonize/WithPidFile.pm', 'lib/Test/MooseX/Daemonize.pm', 't/00-load.t', 't/00-report-prereqs.dd', 't/00-report-prereqs.t', 't/01-filecreate.t', 't/02-stdout.t', 't/10-pidfile.t', 't/20-core.t', 't/21-core-back-compat.t', 't/30-with-pid-file.t', 't/zzz-check-breaks.t', 'xt/author/00-compile.t', 'xt/author/clean-namespaces.t', 'xt/author/eol.t', 'xt/author/kwalitee.t', 'xt/author/mojibake.t', 'xt/author/no-tabs.t', 'xt/release/changes_has_content.t', 'xt/release/cpan-changes.t', 'xt/release/distmeta.t', 'xt/release/minimum-version.t', 'xt/release/pod-coverage.t', 'xt/release/pod-syntax.t', 'xt/release/portability.t' ); eol_unix_ok($_, { trailing_whitespace => 1 }) foreach @files; done_testing; MooseX-Daemonize-0.20/xt/author/kwalitee.t000644 000766 000024 00000000275 12564001461 020763 0ustar00etherstaff000000 000000 # this test was generated with Dist::Zilla::Plugin::Test::Kwalitee 2.11 use strict; use warnings; use Test::More 0.88; use Test::Kwalitee 1.21 'kwalitee_ok'; kwalitee_ok(); done_testing; MooseX-Daemonize-0.20/xt/author/mojibake.t000644 000766 000024 00000000151 12564001461 020730 0ustar00etherstaff000000 000000 #!perl use strict; use warnings qw(all); use Test::More; use Test::Mojibake; all_files_encoding_ok(); MooseX-Daemonize-0.20/xt/author/no-tabs.t000644 000766 000024 00000002124 12564001461 020514 0ustar00etherstaff000000 000000 use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::NoTabs 0.15 use Test::More 0.88; use Test::NoTabs; my @files = ( 'examples/moose_room.pl', 'lib/MooseX/Daemonize.pm', 'lib/MooseX/Daemonize/Core.pm', 'lib/MooseX/Daemonize/Pid.pm', 'lib/MooseX/Daemonize/Pid/File.pm', 'lib/MooseX/Daemonize/WithPidFile.pm', 'lib/Test/MooseX/Daemonize.pm', 't/00-load.t', 't/00-report-prereqs.dd', 't/00-report-prereqs.t', 't/01-filecreate.t', 't/02-stdout.t', 't/10-pidfile.t', 't/20-core.t', 't/21-core-back-compat.t', 't/30-with-pid-file.t', 't/zzz-check-breaks.t', 'xt/author/00-compile.t', 'xt/author/clean-namespaces.t', 'xt/author/eol.t', 'xt/author/kwalitee.t', 'xt/author/mojibake.t', 'xt/author/no-tabs.t', 'xt/release/changes_has_content.t', 'xt/release/cpan-changes.t', 'xt/release/distmeta.t', 'xt/release/minimum-version.t', 'xt/release/pod-coverage.t', 'xt/release/pod-syntax.t', 'xt/release/portability.t' ); notabs_ok($_) foreach @files; done_testing; MooseX-Daemonize-0.20/t/00-load.t000644 000766 000024 00000000242 12564001461 016612 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More tests => 1; BEGIN { use_ok( 'MooseX::Daemonize' ); } diag( "Testing MooseX::Daemonize $MooseX::Daemonize::VERSION" ); MooseX-Daemonize-0.20/t/00-report-prereqs.dd000644 000766 000024 00000023007 12564001461 021015 0ustar00etherstaff000000 000000 do { my $x = { 'configure' => { 'requires' => { 'Devel::AssertOS' => '0', 'Devel::CheckOS' => '1.63', 'Module::Build::Tiny' => '0.007', 'perl' => '5.006' } }, 'develop' => { 'recommends' => { 'Dist::Zilla::PluginBundle::Author::ETHER' => '0.102' }, 'requires' => { 'Dist::Zilla' => '5', 'Dist::Zilla::Plugin::AssertOS' => '0.06', 'Dist::Zilla::Plugin::Authority' => '1.009', 'Dist::Zilla::Plugin::AuthorityFromModule' => '0.002', 'Dist::Zilla::Plugin::AutoMetaResources' => '0', 'Dist::Zilla::Plugin::AutoPrereqs' => '0', 'Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional' => '0.004', 'Dist::Zilla::Plugin::CheckIssues' => '0', 'Dist::Zilla::Plugin::CheckPrereqsIndexed' => '0', 'Dist::Zilla::Plugin::CheckSelfDependency' => '0', 'Dist::Zilla::Plugin::CheckStrictVersion' => '0', 'Dist::Zilla::Plugin::ConfirmRelease' => '0', 'Dist::Zilla::Plugin::CopyFilesFromRelease' => '0', 'Dist::Zilla::Plugin::FileFinder::ByName' => '0', 'Dist::Zilla::Plugin::GenerateFile::ShareDir' => '0', 'Dist::Zilla::Plugin::Git::Check' => '0', 'Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch' => '0.004', 'Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts' => '0', 'Dist::Zilla::Plugin::Git::Commit' => '2.020', 'Dist::Zilla::Plugin::Git::Contributors' => '0.004', 'Dist::Zilla::Plugin::Git::Describe' => '0.004', 'Dist::Zilla::Plugin::Git::GatherDir' => '2.016', 'Dist::Zilla::Plugin::Git::Push' => '0', 'Dist::Zilla::Plugin::Git::Remote::Check' => '0', 'Dist::Zilla::Plugin::Git::Tag' => '0', 'Dist::Zilla::Plugin::GitHub::Update' => '0.40', 'Dist::Zilla::Plugin::GithubMeta' => '0.54', 'Dist::Zilla::Plugin::InstallGuide' => '0', 'Dist::Zilla::Plugin::Keywords' => '0.004', 'Dist::Zilla::Plugin::License' => '5.038', 'Dist::Zilla::Plugin::MakeMaker::Fallback' => '0.012', 'Dist::Zilla::Plugin::Manifest' => '0', 'Dist::Zilla::Plugin::MetaConfig' => '0', 'Dist::Zilla::Plugin::MetaJSON' => '0', 'Dist::Zilla::Plugin::MetaNoIndex' => '0', 'Dist::Zilla::Plugin::MetaProvides::Package' => '1.15000002', 'Dist::Zilla::Plugin::MetaResources' => '0', 'Dist::Zilla::Plugin::MetaTests' => '0', 'Dist::Zilla::Plugin::MetaYAML' => '0', 'Dist::Zilla::Plugin::MinimumPerl' => '1.006', 'Dist::Zilla::Plugin::ModuleBuildTiny::Fallback' => '0.018', 'Dist::Zilla::Plugin::MojibakeTests' => '0.8', 'Dist::Zilla::Plugin::NextRelease' => '5.033', 'Dist::Zilla::Plugin::PodCoverageTests' => '0', 'Dist::Zilla::Plugin::PodSyntaxTests' => '0', 'Dist::Zilla::Plugin::PodWeaver' => '4.005', 'Dist::Zilla::Plugin::Prereqs' => '0', 'Dist::Zilla::Plugin::Prereqs::AuthorDeps' => '0', 'Dist::Zilla::Plugin::PromptIfStale' => '0', 'Dist::Zilla::Plugin::Readme' => '0', 'Dist::Zilla::Plugin::ReadmeAnyFromPod' => '0.142180', 'Dist::Zilla::Plugin::RemovePrereqs' => '0', 'Dist::Zilla::Plugin::RewriteVersion::Transitional' => '0.004', 'Dist::Zilla::Plugin::Run::AfterBuild' => '0.038', 'Dist::Zilla::Plugin::Run::AfterRelease' => '0.038', 'Dist::Zilla::Plugin::RunExtraTests' => '0.024', 'Dist::Zilla::Plugin::StaticInstall' => '0.005', 'Dist::Zilla::Plugin::Test::CPAN::Changes' => '0.008', 'Dist::Zilla::Plugin::Test::ChangesHasContent' => '0', 'Dist::Zilla::Plugin::Test::CheckBreaks' => '0', 'Dist::Zilla::Plugin::Test::CleanNamespaces' => '0.006', 'Dist::Zilla::Plugin::Test::Compile' => '2.039', 'Dist::Zilla::Plugin::Test::EOL' => '0.17', 'Dist::Zilla::Plugin::Test::Kwalitee' => '2.06', 'Dist::Zilla::Plugin::Test::MinimumVersion' => '2.000003', 'Dist::Zilla::Plugin::Test::NoTabs' => '0.08', 'Dist::Zilla::Plugin::Test::Portability' => '0', 'Dist::Zilla::Plugin::Test::ReportPrereqs' => '0.019', 'Dist::Zilla::Plugin::TestRelease' => '0', 'Dist::Zilla::Plugin::UploadToCPAN' => '0', 'Dist::Zilla::PluginBundle::Author::ETHER' => '0.101', 'File::Spec' => '0', 'IO::Handle' => '0', 'IPC::Open3' => '0', 'Pod::Coverage::TrustPod' => '0', 'Software::License::Perl_5' => '0', 'Test::CPAN::Changes' => '0.19', 'Test::CPAN::Meta' => '0', 'Test::CleanNamespaces' => '0.15', 'Test::EOL' => '0', 'Test::Kwalitee' => '1.21', 'Test::Mojibake' => '0', 'Test::More' => '0.96', 'Test::NoTabs' => '0', 'Test::Pod' => '1.41', 'Test::Pod::Coverage' => '1.08', 'blib' => '1.01', 'perl' => '5.006' } }, 'runtime' => { 'requires' => { 'File::Path' => '2.08', 'Moose' => '0', 'Moose::Role' => '0', 'Moose::Util::TypeConstraints' => '0', 'MooseX::Getopt' => '0', 'MooseX::Getopt::OptionTypeMap' => '0', 'MooseX::Types::Path::Class' => '0', 'POSIX' => '0', 'Sub::Exporter' => '0', 'Test::Builder' => '0', 'namespace::autoclean' => '0', 'perl' => '5.008003', 'strict' => '0', 'warnings' => '0' } }, 'test' => { 'recommends' => { 'CPAN::Meta' => '2.120900' }, 'requires' => { 'ExtUtils::MakeMaker' => '0', 'File::Spec' => '0', 'File::Spec::Functions' => '0', 'File::Temp' => '0', 'Test::Fatal' => '0', 'Test::Moose' => '0', 'Test::More' => '0.88', 'constant' => '0', 'perl' => '5.008003' } } }; $x; }MooseX-Daemonize-0.20/t/00-report-prereqs.t000644 000766 000024 00000012750 12564001461 020674 0ustar00etherstaff000000 000000 #!perl use strict; use warnings; # This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.021 use Test::More tests => 1; use ExtUtils::MakeMaker; use File::Spec; # from $version::LAX my $lax_version_re = qr/(?: undef | (?: (?:[0-9]+) (?: \. | (?:\.[0-9]+) (?:_[0-9]+)? )? | (?:\.[0-9]+) (?:_[0-9]+)? ) | (?: v (?:[0-9]+) (?: (?:\.[0-9]+)+ (?:_[0-9]+)? )? | (?:[0-9]+)? (?:\.[0-9]+){2,} (?:_[0-9]+)? ) )/x; # hide optional CPAN::Meta modules from prereq scanner # and check if they are available my $cpan_meta = "CPAN::Meta"; my $cpan_meta_pre = "CPAN::Meta::Prereqs"; my $HAS_CPAN_META = eval "require $cpan_meta; $cpan_meta->VERSION('2.120900')" && eval "require $cpan_meta_pre"; ## no critic # Verify requirements? my $DO_VERIFY_PREREQS = 1; sub _max { my $max = shift; $max = ( $_ > $max ) ? $_ : $max for @_; return $max; } sub _merge_prereqs { my ($collector, $prereqs) = @_; # CPAN::Meta::Prereqs object if (ref $collector eq $cpan_meta_pre) { return $collector->with_merged_prereqs( CPAN::Meta::Prereqs->new( $prereqs ) ); } # Raw hashrefs for my $phase ( keys %$prereqs ) { for my $type ( keys %{ $prereqs->{$phase} } ) { for my $module ( keys %{ $prereqs->{$phase}{$type} } ) { $collector->{$phase}{$type}{$module} = $prereqs->{$phase}{$type}{$module}; } } } return $collector; } my @include = qw( Pod::Coverage ); my @exclude = qw( ); # Add static prereqs to the included modules list my $static_prereqs = do 't/00-report-prereqs.dd'; # Merge all prereqs (either with ::Prereqs or a hashref) my $full_prereqs = _merge_prereqs( ( $HAS_CPAN_META ? $cpan_meta_pre->new : {} ), $static_prereqs ); # Add dynamic prereqs to the included modules list (if we can) my ($source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; if ( $source && $HAS_CPAN_META ) { if ( my $meta = eval { CPAN::Meta->load_file($source) } ) { $full_prereqs = _merge_prereqs($full_prereqs, $meta->prereqs); } } else { $source = 'static metadata'; } my @full_reports; my @dep_errors; my $req_hash = $HAS_CPAN_META ? $full_prereqs->as_string_hash : $full_prereqs; # Add static includes into a fake section for my $mod (@include) { $req_hash->{other}{modules}{$mod} = 0; } for my $phase ( qw(configure build test runtime develop other) ) { next unless $req_hash->{$phase}; next if ($phase eq 'develop' and not $ENV{AUTHOR_TESTING}); for my $type ( qw(requires recommends suggests conflicts modules) ) { next unless $req_hash->{$phase}{$type}; my $title = ucfirst($phase).' '.ucfirst($type); my @reports = [qw/Module Want Have/]; for my $mod ( sort keys %{ $req_hash->{$phase}{$type} } ) { next if $mod eq 'perl'; next if grep { $_ eq $mod } @exclude; my $file = $mod; $file =~ s{::}{/}g; $file .= ".pm"; my ($prefix) = grep { -e File::Spec->catfile($_, $file) } @INC; my $want = $req_hash->{$phase}{$type}{$mod}; $want = "undef" unless defined $want; $want = "any" if !$want && $want == 0; my $req_string = $want eq 'any' ? 'any version required' : "version '$want' required"; if ($prefix) { my $have = MM->parse_version( File::Spec->catfile($prefix, $file) ); $have = "undef" unless defined $have; push @reports, [$mod, $want, $have]; if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META && $type eq 'requires' ) { if ( $have !~ /\A$lax_version_re\z/ ) { push @dep_errors, "$mod version '$have' cannot be parsed ($req_string)"; } elsif ( ! $full_prereqs->requirements_for( $phase, $type )->accepts_module( $mod => $have ) ) { push @dep_errors, "$mod version '$have' is not in required range '$want'"; } } } else { push @reports, [$mod, $want, "missing"]; if ( $DO_VERIFY_PREREQS && $type eq 'requires' ) { push @dep_errors, "$mod is not installed ($req_string)"; } } } if ( @reports ) { push @full_reports, "=== $title ===\n\n"; my $ml = _max( map { length $_->[0] } @reports ); my $wl = _max( map { length $_->[1] } @reports ); my $hl = _max( map { length $_->[2] } @reports ); if ($type eq 'modules') { splice @reports, 1, 0, ["-" x $ml, "", "-" x $hl]; push @full_reports, map { sprintf(" %*s %*s\n", -$ml, $_->[0], $hl, $_->[2]) } @reports; } else { splice @reports, 1, 0, ["-" x $ml, "-" x $wl, "-" x $hl]; push @full_reports, map { sprintf(" %*s %*s %*s\n", -$ml, $_->[0], $wl, $_->[1], $hl, $_->[2]) } @reports; } push @full_reports, "\n"; } } } if ( @full_reports ) { diag "\nVersions for all modules listed in $source (including optional ones):\n\n", @full_reports; } if ( @dep_errors ) { diag join("\n", "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n", "The following REQUIRED prerequisites were not satisfied:\n", @dep_errors, "\n" ); } pass; # vim: ts=4 sts=4 sw=4 et: MooseX-Daemonize-0.20/t/01-filecreate.t000644 000766 000024 00000006103 12564001461 020001 0ustar00etherstaff000000 000000 use strict; use warnings; use File::Spec::Functions; use Test::More tests => 29; use Test::Moose; use File::Temp qw(tempdir); my $dir = tempdir( CLEANUP => 1 ); BEGIN { use_ok('MooseX::Daemonize'); } use constant DEBUG => 0; my $FILENAME = catfile($dir, "im_alive"); $ENV{MX_DAEMON_STDOUT} = catfile($dir, 'Out.txt'); $ENV{MX_DAEMON_STDERR} = catfile($dir, 'Err.txt'); { package FileMaker; use Moose; with qw(MooseX::Daemonize); has filename => ( isa => 'Str', is => 'ro' ); after start => sub { my $self = shift; if ($self->is_daemon) { $self->create_file( $self->filename ); } }; sub create_file { my ( $self, $file ) = @_; open( my $FILE, ">$file" ) || die $!; close($FILE); sleep 1 while 1; } } my $app = FileMaker->new( pidbase => "$dir/subdir", filename => $FILENAME, ); isa_ok($app, 'FileMaker'); does_ok($app, 'MooseX::Daemonize'); does_ok($app, 'MooseX::Daemonize::WithPidFile'); does_ok($app, 'MooseX::Daemonize::Core'); isa_ok($app->pidfile, 'MooseX::Daemonize::Pid::File'); is($app->pidfile->file, catfile("$dir/subdir", "filemaker.pid"), '... got the right PID file path'); ok(not(-e $app->pidfile->file), '... our pidfile does not exist'); ok(!$app->status, '... the daemon is running'); is($app->exit_code, MooseX::Daemonize->ERROR, '... got the right error code'); ok($app->stop, '... the app will stop cause its not running'); is($app->status_message, "Not running", '... got the correct status message'); is($app->exit_code, MooseX::Daemonize->OK, '... got the right error code'); diag $$ if DEBUG; ok($app->start, '... daemon started'); is($app->status_message, "Start succeeded", '... got the correct status message'); is($app->exit_code, MooseX::Daemonize->OK, '... got the right error code'); sleep(1); # give it a second ... ok(-e $app->pidfile->file, '... our pidfile exists' ); my $pid = $app->pidfile->pid; isnt($pid, $$, '... the pid in our pidfile is correct (and not us)'); ok($app->status, '... the daemon is running'); is($app->status_message, "Daemon is running with pid ($pid)", '... got the correct status message'); is($app->exit_code, MooseX::Daemonize->OK, '... got the right error code'); if (DEBUG) { diag `ps $pid`; diag "Status is: " . $app->status_message; } ok( -e $app->filename, "file exists" ); if (DEBUG) { diag `ps $pid`; diag "Status is: " . $app->status_message; } ok( $app->stop, '... app stopped' ); is($app->status_message, "Stop succeeded", '... got the correct status message'); is($app->exit_code, MooseX::Daemonize->OK, '... got the right error code'); ok(!$app->status, '... the daemon is no longer running'); is($app->status_message, "Daemon is not running with pid ($pid)", '... got the correct status message'); is($app->exit_code, MooseX::Daemonize->ERROR, '... got the right error code'); if (DEBUG) { diag `ps $pid`; diag "Status is: " . $app->status_message; } ok( not(-e $app->pidfile->file) , '... pidfile gone' ); unlink $FILENAME; unlink $ENV{MX_DAEMON_STDOUT}; unlink $ENV{MX_DAEMON_STDERR}; MooseX-Daemonize-0.20/t/02-stdout.t000644 000766 000024 00000002342 12564001461 017222 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Builder; use Test::MooseX::Daemonize; use MooseX::Daemonize; my $Test = Test::Builder->new; { package TestOutput; use Moose; with qw(MooseX::Daemonize); with qw(Test::MooseX::Daemonize::Testable); # setup our test environment after start => sub { my ($self) = @_; $self->output_ok() if $self->is_daemon; }; sub output_ok { my ($self) = @_; my $count = 1; for ( 0 .. 3 ) { $Test->ok( $count++, "$count output_ok" ); sleep(1); } } no Moose; } package main; use strict; use warnings; use File::Spec::Functions; use File::Temp qw(tempdir); my $dir = tempdir( CLEANUP => 1 ); ## Try to make sure we are in the test directory my $app = TestOutput->new( pidbase => $dir, test_output => catfile($dir, 'results'), ); daemonize_ok( $app, 'child forked okay' ); sleep(3); # give ourself a chance to produce some output my $warnings = ""; { local $SIG{__WARN__} = sub { $warnings .= $_[0]; warn @_ }; $app->stop( no_exit => 1 ); } is($warnings, "", "No warnings from stop"); check_test_output($app); unlink( $app->test_output ); done_testing; exit; MooseX-Daemonize-0.20/t/10-pidfile.t000644 000766 000024 00000004552 12564001461 017320 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More tests => 25; use Test::Fatal; BEGIN { use_ok('MooseX::Daemonize::Pid::File'); } { my $f = MooseX::Daemonize::Pid::File->new( file => [ 't', 'foo.pid' ] ); isa_ok($f, 'MooseX::Daemonize::Pid::File'); isa_ok($f->file, 'Path::Class::File'); is($f->pid, $$, '... the PID is our current process'); is( exception { $f->write }, undef, '... writing the PID file', ); is($f->file->slurp(chomp => 1), $f->pid, '... the PID in the file is correct'); ok($f->is_running, '... it is running too'); is( exception { $f->remove }, undef, '... removing the PID file', ); ok(!-e $f->file, '... the PID file does not exist anymore'); } { my $f = MooseX::Daemonize::Pid::File->new( file => [ 't', 'bar.pid' ] ); isa_ok($f, 'MooseX::Daemonize::Pid::File'); isa_ok($f->file, 'Path::Class::File'); is( exception { $f->write }, undef, '... writing the PID file', ); is($f->file->slurp(chomp => 1), $f->pid, '... the PID in the file is correct'); is($f->pid, $$, '... the PID is our current process'); ok($f->is_running, '... it is running too'); is( exception { $f->remove }, undef, '... removing the PID file', ); ok(!-e $f->file, '... the PID file does not exist anymore'); } { # find a pid that doesn't currently exist - start by looking at our own # and going backwards (not 100% reliable but better than hardcoding one) my $PID = $$; do { $PID--; $PID = 2**32 if $PID < 1 } while kill(0, $PID); diag 'assigning the non-existent pid ' . $PID; my $f = MooseX::Daemonize::Pid::File->new( file => [ 't', 'baz.pid' ], pid => $PID, ); isa_ok($f, 'MooseX::Daemonize::Pid::File'); isa_ok($f->file, 'Path::Class::File'); is($f->pid, $PID, '... the PID is our made up PID'); is( exception { $f->write }, undef, '... writing the PID file', ); is($f->file->slurp(chomp => 1), $f->pid, '... the PID in the file is correct'); ok(!$f->is_running, '... it is not running (cause we made the PID up)'); is( exception { $f->remove }, undef, '... removing the PID file', ); ok(!-e $f->file, '... the PID file does not exist anymore'); } MooseX-Daemonize-0.20/t/20-core.t000644 000766 000024 00000004467 12564001461 016642 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; use Test::Moose; use File::Temp qw(tempdir); use File::Spec::Functions; my $dir = tempdir( CLEANUP => 1 ); BEGIN { use_ok('MooseX::Daemonize::Core'); use_ok('MooseX::Daemonize::Pid'); } use constant DEBUG => 0; $ENV{MX_DAEMON_STDOUT} = catfile($dir, 'Out.txt'); $ENV{MX_DAEMON_STDERR} = catfile($dir, 'Err.txt'); { package MyFooDaemon; use Moose; with 'MooseX::Daemonize::Core'; has 'daemon_pid' => (is => 'rw', isa => 'MooseX::Daemonize::Pid'); # capture the PID from the fork around 'daemon_fork' => sub { my $next = shift; my $self = shift; if (my $pid = $self->$next(@_)) { $self->daemon_pid( MooseX::Daemonize::Pid->new(pid => $pid) ); } }; sub start { my $self = shift; # tell it to ignore zombies ... $self->ignore_zombies( 1 ); $self->no_double_fork( 1 ); $self->daemonize; return unless $self->is_daemon; # change to our local dir # so that we can debug easier chdir $dir; # make it easy to find with ps $0 = 'test-app'; $SIG{INT} = sub { print "Got INT! Oh Noes!"; exit; }; while (1) { print "Hello from $$\n"; sleep(10); } exit; } } my $d = MyFooDaemon->new; isa_ok($d, 'MyFooDaemon'); does_ok($d, 'MooseX::Daemonize::Core'); is( exception { $d->start }, undef, '... successfully daemonized from (' . $$ . ')', ); my $p = $d->daemon_pid; isa_ok($p, 'MooseX::Daemonize::Pid'); ok($p->is_running, '... the daemon process is running (' . $p->pid . ')'); my $pid = $p->pid; if (DEBUG) { diag `ps $pid`; diag "-------"; diag `ps -x | grep test-app`; diag "-------"; diag "killing $pid"; } kill INT => $p->pid; diag "killed $pid" if DEBUG; # give the process time to be killed on slow/loaded systems for (1..10) { last unless kill 0 => $pid; # sleep a little before retrying sleep(2); } if (DEBUG) { diag `ps $pid`; diag "-------"; diag `ps -x | grep test-app`; } ok(!$p->is_running, '... the daemon process is no longer running (' . $p->pid . ')'); unlink $ENV{MX_DAEMON_STDOUT}; unlink $ENV{MX_DAEMON_STDERR}; done_testing; MooseX-Daemonize-0.20/t/21-core-back-compat.t000644 000766 000024 00000004474 12564001461 021020 0ustar00etherstaff000000 000000 use strict; use warnings; use Test::More; use Test::Fatal; use Test::Moose; use File::Temp qw(tempdir); use File::Spec::Functions; my $dir = tempdir( CLEANUP => 1 ); BEGIN { use_ok('MooseX::Daemonize::Core'); use_ok('MooseX::Daemonize::Pid'); } use constant DEBUG => 0; $ENV{MX_DAEMON_STDOUT} = catfile($dir, 'Out.txt'); $ENV{MX_DAEMON_STDERR} = catfile($dir, 'Err.txt'); { package MyFooDaemon; use Moose; with 'MooseX::Daemonize::Core'; has 'daemon_pid' => (is => 'rw', isa => 'MooseX::Daemonize::Pid'); # capture the PID from the fork around 'daemon_fork' => sub { my $next = shift; my $self = shift; if (my $pid = $self->$next(@_)) { $self->daemon_pid( MooseX::Daemonize::Pid->new(pid => $pid) ); } }; sub start { my $self = shift; # tell it to ignore zombies ... $self->daemonize( ignore_zombies => 1, no_double_fork => 1, ); return unless $self->is_daemon; # change to our local dir # so that we can debug easier chdir $dir; # make it easy to find with ps $0 = 'test-app'; $SIG{INT} = sub { print "Got INT! Oh Noes!"; exit; }; while (1) { print "Hello from $$\n"; sleep(10); } exit; } } my $d = MyFooDaemon->new; isa_ok($d, 'MyFooDaemon'); does_ok($d, 'MooseX::Daemonize::Core'); is( exception { $d->start }, undef, '... successfully daemonized from (' . $$ . ')', ); my $p = $d->daemon_pid; isa_ok($p, 'MooseX::Daemonize::Pid'); ok($p->is_running, '... the daemon process is running (' . $p->pid . ')'); my $pid = $p->pid; if (DEBUG) { diag `ps $pid`; diag "-------"; diag `ps -x | grep test-app`; diag "-------"; diag "killing $pid"; } kill INT => $p->pid; diag "killed $pid" if DEBUG; # give the process time to be killed on slow/loaded systems for (1..10) { last unless kill 0 => $pid; # sleep a little before retrying sleep(2); } if (DEBUG) { diag `ps $pid`; diag "-------"; diag `ps -x | grep test-app`; } ok(!$p->is_running, '... the daemon process is no longer running (' . $p->pid . ')'); unlink $ENV{MX_DAEMON_STDOUT}; unlink $ENV{MX_DAEMON_STDERR}; done_testing; MooseX-Daemonize-0.20/t/30-with-pid-file.t000644 000766 000024 00000004731 12564001461 020347 0ustar00etherstaff000000 000000 use strict; use warnings; use File::Spec::Functions; use Test::More; use Test::Fatal; use Test::Moose; use File::Temp qw(tempdir); my $dir = tempdir( CLEANUP => 1 ); BEGIN { use_ok('MooseX::Daemonize::Core'); } use constant DEBUG => 0; my $PIDFILE = catfile($dir, 'test-app.pid'); $ENV{MX_DAEMON_STDOUT} = catfile($dir, 'Out.txt'); $ENV{MX_DAEMON_STDERR} = catfile($dir, 'Err.txt'); { package MyFooDaemon; use Moose; with 'MooseX::Daemonize::WithPidFile'; sub init_pidfile { MooseX::Daemonize::Pid::File->new( file => $PIDFILE ) } sub start { my $self = shift; # this tests our bad PID # cleanup functionality. print "Our parent PID is " . $self->pidfile->pid . "\n" if ::DEBUG; $self->daemonize; return unless $self->is_daemon; # make it easy to find with ps $0 = 'test-app-2'; $SIG{INT} = sub { print "Got INT! Oh Noes!"; $self->pidfile->remove; exit; }; while (1) { print "Hello from $$\n"; sleep(10); } exit; } } my $d = MyFooDaemon->new( pidfile => $PIDFILE ); isa_ok($d, 'MyFooDaemon'); does_ok($d, 'MooseX::Daemonize::Core'); does_ok($d, 'MooseX::Daemonize::WithPidFile'); ok($d->has_pidfile, '... we have a pidfile value'); { my $p = $d->pidfile; isa_ok($p, 'MooseX::Daemonize::Pid::File'); #diag $p->dump; } ok(!(-e $PIDFILE), '... the PID file does not exist yet'); is( exception { $d->start }, undef, '... successfully daemonized from (' . $$ . ')', ); my $p = $d->pidfile; isa_ok($p, 'MooseX::Daemonize::Pid::File'); #diag $p->dump; sleep(2); ok($p->does_file_exist, '... the PID file exists'); ok($p->is_running, '... the daemon process is running (' . $p->pid . ')'); my $pid = $p->pid; if (DEBUG) { diag `ps $pid`; diag "-------"; diag `ps -x | grep test-app`; diag "-------"; diag "killing $pid"; } kill INT => $p->pid; diag "killed $pid" if DEBUG; # give the process time to be killed on slow/loaded systems for (1..10) { last unless kill 0 => $pid; # sleep a little before retrying sleep(2); } if (DEBUG) { diag `ps $pid`; diag "-------"; diag `ps -x | grep test-app`; } ok(!$p->is_running, '... the daemon process is no longer running (' . $p->pid . ')'); ok(!(-e $PIDFILE), '... the PID file has been removed'); unlink $ENV{MX_DAEMON_STDOUT}; unlink $ENV{MX_DAEMON_STDERR}; done_testing; MooseX-Daemonize-0.20/t/zzz-check-breaks.t000644 000766 000024 00000000634 12564001461 020640 0ustar00etherstaff000000 000000 use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::CheckBreaks 0.012 use Test::More 0.88; SKIP: { eval 'require Moose::Conflicts; Moose::Conflicts->check_conflicts'; skip('no Moose::Conflicts module found', 1) if not $INC{'Moose/Conflicts.pm'}; diag $@ if $@; pass 'conflicts checked via Moose::Conflicts'; } pass 'no x_breaks data to check'; done_testing; MooseX-Daemonize-0.20/lib/MooseX/000700 000766 000024 00000000000 12564001461 016776 5ustar00etherstaff000000 000000 MooseX-Daemonize-0.20/lib/Test/000700 000766 000024 00000000000 12564001461 016503 5ustar00etherstaff000000 000000 MooseX-Daemonize-0.20/lib/Test/MooseX/000700 000766 000024 00000000000 12564001461 017715 5ustar00etherstaff000000 000000 MooseX-Daemonize-0.20/lib/Test/MooseX/Daemonize.pm000600 000766 000024 00000007740 12564001461 022200 0ustar00etherstaff000000 000000 use strict; use warnings; package Test::MooseX::Daemonize; # ABSTRACT: Tool to help test MooseX::Daemonize applications our $VERSION = '0.20'; # BEGIN CARGO CULTING use Sub::Exporter -setup => { exports => [ qw(daemonize_ok check_test_output) ], groups => { default => [ qw(daemonize_ok check_test_output) ] }, }; use Test::Builder; our $Test = Test::Builder->new; sub daemonize_ok { my ( $daemon, $msg ) = @_; unless ( my $pid = fork ) { $daemon->start(); exit; } else { sleep(1); # Punt on sleep time, 1 seconds should be enough $Test->ok( $daemon->pidfile->does_file_exist, $msg ) || $Test->diag( 'Pidfile (' . $daemon->pidfile->file . ') not found.' ); } } sub check_test_output { my ($app) = @_; open( my $stdout_in, '<', $app->test_output ) or die "can't open test output: $!"; while ( my $line = <$stdout_in> ) { $line =~ s/\s+\z//; my $label; if ( $line =~ /\A(?:(not\s+)?ok)(?:\s+-)(?:\s+(.*))\z/ ) { my ( $not, $text ) = ( $1, $2, $3 ); $text ||= ''; # We don't just call ok(!$not), because that generates diagnostics of # its own for failures. We only want the diagnostics from the child. my $orig_no_diag = $Test->no_diag; $Test->no_diag(1); $Test->ok(!$not, $text); $Test->no_diag($orig_no_diag); } elsif ( $line =~ s/\A#\s?// ) { $Test->diag($line); } else { $Test->diag("$label: $line (unrecognised)\n"); } } } package Test::MooseX::Daemonize::Testable; use Moose::Role; has test_output => ( isa => 'Str', is => 'ro', required => 1, ); after daemonize => sub { $Test->use_numbers(0); $Test->no_ending(1); open my $out, '>', $_[0]->test_output or die "Cannot open test output: $!"; my $fileno = fileno $out; open STDERR, ">&=", $fileno or die "Can't redirect STDERR"; open STDOUT, ">&=", $fileno or die "Can't redirect STDOUT"; $Test->output($out); $Test->failure_output($out); $Test->todo_output($out); }; 1; __END__ =pod =encoding UTF-8 =head1 NAME Test::MooseX::Daemonize - Tool to help test MooseX::Daemonize applications =head1 VERSION version 0.20 =head1 SYNOPSIS use File::Spec::Functions; use File::Temp qw(tempdir); my $dir = tempdir( CLEANUP => 1 ); ## Try to make sure we are in the test directory my $file = catfile( $dir, "im_alive" ); my $daemon = FileMaker->new( pidbase => $dir, filename => $file ); daemonize_ok( $daemon, 'child forked okay' ); ok( -e $file, "$file exists" ); =head1 DESCRIPTION This module provides some basic L-compatible test methods to use when writing tests for your L-based modules. =head1 EXPORTED FUNCTIONS =over 4 =item B This will attempt to daemonize your C<$daemon> returning ok on success and not ok on failure. =item B This is expected to be used with a C<$daemon> which does the B role (included in this package see the source for more info). It will collect the test output from your daemon and apply it in the parent process by mucking around with L stuff, again, read the source for more info. If we get time we will document this more thoroughly. =back =head1 BUGS AND LIMITATIONS Please report any bugs or feature requests to C, or through the web interface at L. =head1 SEE ALSO L =head1 AUTHORS =over 4 =item * Stevan Little =item * Chris Prather =back =head1 COPYRIGHT AND LICENCE This software is copyright (c) 2007 by Chris Prather. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut MooseX-Daemonize-0.20/lib/MooseX/Daemonize/000700 000766 000024 00000000000 12564001461 020711 5ustar00etherstaff000000 000000 MooseX-Daemonize-0.20/lib/MooseX/Daemonize.pm000600 000766 000024 00000034763 12564001461 021266 0ustar00etherstaff000000 000000 use strict; use warnings; package MooseX::Daemonize; # git description: v0.19-17-gf6822c0 # ABSTRACT: Role for daemonizing your Moose based application our $VERSION = '0.20'; use Moose::Role; use MooseX::Types::Path::Class; use File::Path qw(make_path); use namespace::autoclean; with 'MooseX::Daemonize::WithPidFile', 'MooseX::Getopt'; sub OK () { 0 } sub ERROR () { 1 } has progname => ( metaclass => 'Getopt', isa => 'Str', is => 'ro', lazy => 1, required => 1, default => sub { ( my $name = lc $_[0]->meta->name ) =~ s/::/_/g; return $name; }, documentation => 'the name of the daemon', ); has pidbase => ( metaclass => 'Getopt', isa => 'Path::Class::Dir', is => 'ro', coerce => 1, required => 1, lazy => 1, default => sub { Path::Class::Dir->new('', 'var', 'run') }, documentation => 'the base for our pid (default: /var/run)', ); has basedir => ( metaclass => 'Getopt', isa => 'Path::Class::Dir', is => 'ro', coerce => 1, required => 1, lazy => 1, default => sub { Path::Class::Dir->new('/') }, documentation => 'the directory to chdir to (default: /)', ); has foreground => ( metaclass => 'Getopt', cmd_aliases => 'f', isa => 'Bool', is => 'ro', default => sub { 0 }, documentation => 'if true, the process won\'t background', ); has stop_timeout => ( metaclass => 'Getopt', isa => 'Int', is => 'rw', default => sub { 2 }, documentation => 'number of seconds to wait for the process to stop, before trying harder to kill it (default: 2 s)', ); # internal book-keeping has status_message => ( metaclass => 'NoGetopt', isa => 'Str', is => 'rw', clearer => 'clear_status_message', ); has exit_code => ( metaclass => 'NoGetopt', isa => 'Int', is => 'rw', clearer => 'clear_exit_code', ); # methods ... ## PID file related stuff ... sub init_pidfile { my $self = shift; my $file = $self->pidbase . '/' . $self->progname . '.pid'; if ( !-d $self->pidbase ) { make_path( $self->pidbase, { error => \my $err } ); if (@$err) { confess sprintf( "Cannot create pidbase directory '%s': %s", $self->pidbase, @$err ); } } confess "Cannot write to $file" unless (-e $file ? -w $file : -w $self->pidbase); MooseX::Daemonize::Pid::File->new( file => $file ); } # backwards compat, sub check { (shift)->pidfile->is_running } sub save_pid { (shift)->pidfile->write } sub remove_pid { (shift)->pidfile->remove } sub get_pid { (shift)->pidfile->pid } ## signal handling ... sub setup_signals { my $self = shift; $SIG{'INT'} = sub { $self->shutdown }; # I can't think of a sane default here really ... # $SIG{'HUP'} = sub { $self->handle_sighup }; } sub shutdown { my $self = shift; $self->pidfile->remove if $self->pidfile->pid == $$; exit(0); } ## daemon control methods ... sub start { my $self = shift; $self->clear_status_message; $self->clear_exit_code; if ($self->pidfile->is_running) { $self->exit_code($self->OK); $self->status_message('Daemon is already running with pid (' . $self->pidfile->pid . ')'); return !($self->exit_code); } if ($self->foreground) { $self->is_daemon(1); } else { eval { $self->daemonize }; if ($@) { $self->exit_code($self->ERROR); $self->status_message('Start failed : ' . $@); return !($self->exit_code); } } unless ($self->is_daemon) { $self->exit_code($self->OK); $self->status_message('Start succeeded'); return !($self->exit_code); } $self->pidfile->pid($$); # Change to basedir chdir $self->basedir; $self->pidfile->write; $self->setup_signals; return $$; } sub status { my $self = shift; $self->clear_status_message; $self->clear_exit_code; if ($self->pidfile->is_running) { $self->exit_code($self->OK); $self->status_message('Daemon is running with pid (' . $self->pidfile->pid . ')'); } else { $self->exit_code($self->ERROR); $self->status_message('Daemon is not running with pid (' . $self->pidfile->pid . ')'); } return !($self->exit_code); } sub restart { my $self = shift; $self->clear_status_message; $self->clear_exit_code; unless ($self->stop) { $self->exit_code($self->ERROR); $self->status_message('Restart (Stop) failed : ' . $@); } unless ($self->start) { $self->exit_code($self->ERROR); $self->status_message('Restart (Start) failed : ' . $@); } if ($self->exit_code == $self->OK) { $self->exit_code($self->OK); $self->status_message("Restart successful"); } return !($self->exit_code); } # Make _kill *really* private my $_kill; sub stop { my $self = shift; $self->clear_status_message; $self->clear_exit_code; # if the pid is not running # then we don't need to stop # anything ... if ($self->pidfile->is_running) { # if we are foreground, then # no need to try and kill # ourselves unless ($self->foreground) { # kill the process ... eval { $self->$_kill($self->pidfile->pid) }; # and complain if we can't ... if ($@) { $self->exit_code($self->ERROR); $self->status_message('Stop failed : ' . $@); } # or gloat if we succeed .. else { $self->exit_code($self->OK); $self->status_message('Stop succeeded'); } } } else { # this just returns the OK # exit code for now, but # we should make this overridable $self->exit_code($self->OK); $self->status_message("Not running"); } # if we are returning to our script # then we actually need the opposite # of what the system/OS expects return !($self->exit_code); } $_kill = sub { my ( $self, $pid ) = @_; return unless $pid; unless ( CORE::kill 0 => $pid ) { # warn "$pid already appears dead."; return; } if ( $pid eq $$ ) { die "$pid is us! Can't commit suicide."; } my $timeout = $self->stop_timeout; # kill 0 => $pid returns 0 if the process is dead # $!{EPERM} could also be true if we cant kill it (permission error) # Try SIGINT ... 2s ... SIGTERM ... 2s ... SIGKILL ... 3s ... UNDEAD! my $terminating_signal; for ( [ 2, $timeout ], [15, $timeout], [9, $timeout * 1.5] ) { my ($signal, $timeout) = @$_; $timeout = int $timeout; CORE::kill($signal, $pid); while ($timeout) { unless(CORE::kill 0 => $pid or $!{EPERM}) { $terminating_signal = $signal; last; } $timeout--; sleep(1) if $timeout; } last if $terminating_signal; } if($terminating_signal) { if($terminating_signal == 9) { # clean up the pidfile ourselves iff we used -9 and it worked warn "Had to resort to 'kill -9' and it worked, wiping pidfile"; eval { $self->pidfile->remove }; if ($@) { warn "Could not remove pidfile (" . $self->pidfile->file . ") because : $!"; } } return; } # IF it is still running Carp::carp "$pid doesn't seem to want to die."; # AHH EVIL DEAD! }; 1; __END__ =pod =encoding UTF-8 =head1 NAME MooseX::Daemonize - Role for daemonizing your Moose based application =head1 VERSION version 0.20 =head1 SYNOPSIS package My::Daemon; use Moose; with qw(MooseX::Daemonize); # ... define your class .... after start => sub { my $self = shift; return unless $self->is_daemon; # your daemon code here ... }; # then in your script ... my $daemon = My::Daemon->new_with_options(); my ($command) = @{$daemon->extra_argv} defined $command || die "No command specified"; $daemon->start if $command eq 'start'; $daemon->status if $command eq 'status'; $daemon->restart if $command eq 'restart'; $daemon->stop if $command eq 'stop'; warn($daemon->status_message); exit($daemon->exit_code); =head1 DESCRIPTION Often you want to write a persistent daemon that has a pid file, and responds appropriately to Signals. This module provides a set of basic roles as an infrastructure to do that. =head1 WARNING The maintainers of this module now recommend using L instead. =head1 CAVEATS When going into background MooseX::Daemonize closes all open file handles. This may interfere with you logging because it may also close the log file handle you want to write to. To prevent this you can either defer opening the log file until after start. Alternatively, use can use the 'dont_close_all_files' option either from the command line or in your .sh script. Assuming you want to use Log::Log4perl for example you could expand the MooseX::Daemonize example above like this. after start => sub { my $self = shift; return unless $self->is_daemon; Log::Log4perl->init(\$log4perl_config); my $logger = Log::Log4perl->get_logger(); $logger->info("Daemon started"); # your daemon code here ... }; =head1 ATTRIBUTES This list includes attributes brought in from other roles as well we include them here for ease of documentation. All of these attributes are settable though L's command line handling, with the exception of C. =over =item I The name of our daemon, defaults to C<$package_name =~ s/::/_/>; =item I The base for our PID, defaults to C =item I The directory we chdir to; defaults to C. =item I The file we store our PID in, defaults to C<$pidbase/$progname.pid> =item I If true, the process won't background. Useful for debugging. This option can be set via Getopt's -f. =item I If true, the process will not perform the typical double-fork, which is extra added protection from your process accidentally acquiring a controlling terminal. More information can be found by Googling "double fork daemonize". =item I If true, the process will not clean up zombie processes. Normally you don't want this. =item I If true, the objects open filehandles will not be closed when daemonized. Normally you don't want this. =item I If true, the process is the backgrounded daemon process, if false it is the parent process. This is useful for example in an C sub { }> block. B This option is explicitly B available through L. =item I Number of seconds to wait for the process to stop, before trying harder to kill it. Defaults to 2 seconds. =back These are the internal attributes, which are not available through MooseX::Getopt. =over 4 =item I =item I =back =head1 METHODS =head2 Daemon Control Methods These methods can be used to control the daemon behavior. Every effort has been made to have these methods DWIM (Do What I Mean), so that you can focus on just writing the code for your daemon. Extending these methods is best done with the L method modifiers, such as C, C and C. =over 4 =item B Setup a pidfile, fork, then setup the signal handlers. =item B Stop the process matching the pidfile, and unlinks the pidfile. =item B Literally this is: $self->stop(); $self->start(); =item B =item B =back =head2 Pidfile Handling Methods =over 4 =item B This method will create a L object and tell it to store the PID in the file C<$pidbase/$progname.pid>. =item B This checks to see if the daemon process is currently running by checking the pidfile. =item B Returns the PID of the daemon process. =item B Write the pidfile. =item B Removes the pidfile. =back =head2 Signal Handling Methods =over 4 =item B Setup the signal handlers, by default it only sets up handlers for SIGINT and SIGHUP. If you wish to add more signals just use the C method modifier and add them. =item B Handle a INT signal, by default calls C<$self->stop()> =item B Handle a HUP signal. By default calls C<$self->restart()> =back =head2 Exit Code Methods These are overridable constant methods used for setting the exit code. =over 4 =item OK Returns 0. =item ERROR Returns 1. =back =head2 Introspection =over 4 =item meta() The C method from L =back =head1 DEPENDENCIES L, L, L and L =head1 INCOMPATIBILITIES Obviously this will not work on Windows. =head1 BUGS AND LIMITATIONS Please report any bugs or feature requests to C, or through the web interface at L. =head1 SEE ALSO L, L, L =head1 THANKS Mike Boyko, Matt S. Trout, Stevan Little, Brandon Black, Ash Berlin and the #moose denizens Some bug fixes sponsored by Takkle Inc. =head1 AUTHORS =over 4 =item * Stevan Little =item * Chris Prather =back =head1 CONTRIBUTORS =for stopwords Karen Etheridge Michael Reddick Yuval Kogman Ash Berlin Brandon L Black David Steinbrunner Dave Rolsky Chisel Wright =over 4 =item * Karen Etheridge =item * Michael Reddick =item * Yuval Kogman =item * Ash Berlin =item * Brandon L Black =item * David Steinbrunner =item * Dave Rolsky =item * Chisel Wright =back =head1 COPYRIGHT AND LICENCE This software is copyright (c) 2007 by Chris Prather. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut MooseX-Daemonize-0.20/lib/MooseX/Daemonize/Core.pm000600 000766 000024 00000024560 12564001461 022150 0ustar00etherstaff000000 000000 use strict; use warnings; package MooseX::Daemonize::Core; # ABSTRACT: A Role with the core daemonization features our $VERSION = '0.20'; use MooseX::Getopt; # to load the NoGetopt metaclass use Moose::Role; use POSIX (); use namespace::autoclean; has is_daemon => ( # NOTE: # this should never be accessible # from the command line # - SL metaclass => 'NoGetopt', isa => 'Bool', is => 'rw', default => sub { 0 }, ); has ignore_zombies => ( metaclass => 'Getopt', isa => 'Bool', is => 'rw', default => sub { 0 }, ); has no_double_fork => ( metaclass => 'Getopt', isa => 'Bool', is => 'rw', default => sub { 0 }, ); has dont_close_all_files => ( metaclass => 'Getopt', isa => 'Bool', is => 'rw', default => sub { 0 }, ); sub _get_options { my ($self, %options) = @_; # backwards compatibility.. old code might be calling daemon_fork/_detach with options foreach my $opt (qw( ignore_zombies no_double_fork dont_close_all_files )) { $self->$opt( $options{ $opt } ) if ( defined $options{ $opt } ); } } sub daemon_fork { my ($self, %options) = @_; $self->_get_options( %options ); $SIG{CHLD} = 'IGNORE' if $self->ignore_zombies;; if (my $pid = fork) { return $pid; } else { $self->is_daemon(1); return; } } sub daemon_detach { my ($self, %options) = @_; return unless $self->is_daemon; # return if parent ... $self->_get_options( %options ); # now we are in the daemon ... (POSIX::setsid) # set session id || confess "Cannot detach from controlling process"; unless ( $self->no_double_fork ) { $SIG{'HUP'} = 'IGNORE'; fork && exit; } chdir '/'; # change to root directory umask 0; # clear the file creation mask unless ( $self->dont_close_all_files ) { # get the max number of possible file descriptors my $openmax = POSIX::sysconf( &POSIX::_SC_OPEN_MAX ); $openmax = 64 if !defined($openmax) || $openmax < 0; # close them all POSIX::close($_) foreach (0 .. $openmax); } # fixup STDIN ... open(STDIN, "+>/dev/null") or confess "Could not redirect STDOUT to /dev/null"; # fixup STDOUT ... if (my $stdout_file = $ENV{MX_DAEMON_STDOUT}) { open STDOUT, ">", $stdout_file or confess "Could not redirect STDOUT to $stdout_file : $!"; } else { open(STDOUT, "+>&STDIN") or confess "Could not redirect STDOUT to /dev/null"; } # fixup STDERR ... if (my $stderr_file = $ENV{MX_DAEMON_STDERR}) { open STDERR, ">", $stderr_file or confess "Could not redirect STDERR to $stderr_file : $!"; } else { open(STDERR, "+>&STDIN") or confess "Could not redirect STDERR to /dev/null"; ; } # do a little house cleaning ... # Avoid 'stdin reopened for output' # warning with newer perls open( NULL, '/dev/null' ); if (0); # return success return 1; } sub daemonize { my ($self, %options) = @_; $self->daemon_fork(%options); $self->daemon_detach(%options); } 1; __END__ =pod =encoding UTF-8 =head1 NAME MooseX::Daemonize::Core - A Role with the core daemonization features =head1 VERSION version 0.20 =head1 SYNOPSIS package My::Daemon; use Moose; with 'MooseX::Daemonize::Core'; sub start { my $self = shift; # daemonize me ... $self->daemonize; # return from the parent,... return unless $self->is_daemon; # but continue on in the child (daemon) } =head1 DESCRIPTION This is the basic daemonization Role, it provides a few methods (see below) and the minimum features needed to properly daemonize your code. =head2 Important Notes None of the methods in this role will exit the parent process for you, it only forks and detaches your child (daemon) process. It is your responsibility to exit the parent process in some way. There is no PID or PID file management in this role, that is your responsibility (see some of the other roles in this distro for that). =head1 ATTRIBUTES =over =item I rw, isa => Bool)> This attribute is used to signal if we are within the daemon process or not. =item I rw, isa => Bool)> Setting this attribute to true will cause this method to not perform the typical double-fork, which is extra added protection from your process accidentally acquiring a controlling terminal. More information can be found above, and by Googling "double fork daemonize". If you the double-fork behavior off, you might want to enable the I. =item I rw, isa => Bool)> Setting this attribute to a true value will result in setting the C<$SIG{CHLD}> handler to C. This tells perl to clean up zombie processes. By default, and for the most part you don't I it, only when you turn off the double fork behavior (with the I attribute) do you sometimes want this behavior. =item I rw, isa => Bool)> Setting this attribute to true will cause it to skip closing all the filehandles. This is useful if you are opening things like sockets and such in the pre-fork. =back =head1 METHODS =over =item B This forks off the child process to be daemonized. Just as with the built in fork, it returns the child pid to the parent process, 0 to the child process. It will also set the is_daemon flag appropriately. The C<%options> argument remains for backwards compatibility, but it is suggested that you use the attributes listed above instead. =item B This detaches the new child process from the terminal by doing the following things. The C<%options> argument remains for backwards compatibility, but it is suggested that you use the attributes listed above instead. =over 4 =item Becomes a session leader This detaches the program from the controlling terminal, it is accomplished by calling C. =item Performing the double-fork See below for information on how to change this part of the process. =item Changes the current working directory to "/" This is standard daemon behavior, if you want a different working directory then simply change it later in your daemons code. =item Clears the file creation mask. =item Closes all open file descriptors. See the I attribute for information on how to change this part of the process. =item Reopen STDERR, STDOUT & STDIN to /dev/null This behavior can be controlled slightly though the C and C environment variables. It will look for a filename in either of these variables and redirect C and/or C to those files. This is useful for debugging and/or testing purposes. B If called from within the parent process (the C flag is set to false), this method will simply return and do nothing. =item B This will simply call C followed by C. The C<%options> argument remains for backwards compatibility, but it is suggested that you use the attributes listed above instead. =item meta() The C method from L =back =back =head1 STUFF YOU SHOULD READ =over 4 =item Note about double fork Taken from L in a comment entitled I, it is not the definitive statement on the issue, but it's clear and well written enough so I decided to reproduce it here. The first fork accomplishes two things - allow the shell to return, and allow you to do a setsid(). The setsid() removes yourself from your controlling terminal. You see, before, you were still listed as a job of your previous process, and therefore the user might accidentally send you a signal. setsid() gives you a new session, and removes the existing controlling terminal. The problem is, you are now a session leader. As a session leader, if you open a file descriptor that is a terminal, it will become your controlling terminal (oops!). Therefore, the second fork makes you NOT be a session leader. Only session leaders can acquire a controlling terminal, so you can open up any file you wish without worrying that it will make you a controlling terminal. So - first fork - allow shell to return, and permit you to call setsid() Second fork - prevent you from accidentally reacquiring a controlling terminal. That said, you don't always want this to be the behavior, so you are free to specify otherwise using the I attribute. =item Note about zombies Doing the double fork (see above) tends to get rid of your zombies since by the time you have double forked your daemon process is then owned by the init process. However, sometimes the double-fork is more than you really need, and you want to keep your daemon processes a little closer to you. In this case you have to watch out for zombies, you can avoid then by just setting the I attribute (see above). =back =head1 ENVIRONMENT VARIABLES These variables are best just used for debugging and/or testing, but not used for actual logging. For that, you should reopen C/C on your own. =over 4 =item B A filename to redirect the daemon C to. =item B A filename to redirect the daemon C to. =back =head1 DEPENDENCIES L, L =head1 INCOMPATIBILITIES =head1 BUGS AND LIMITATIONS Please report any bugs or feature requests to C, or through the web interface at L. =head1 SEE ALSO L This code is based B on L, we originally depended on it, but we needed some more flexibility, so instead we just stole the code. =head1 AUTHORS =over 4 =item * Stevan Little =item * Chris Prather =back =head1 COPYRIGHT AND LICENCE Copyright (c) 2007-2011, Chris Prather C<< >>. All rights reserved. Portions heavily borrowed from L which is copyright Earl Hood. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L. =cut MooseX-Daemonize-0.20/lib/MooseX/Daemonize/Pid/000700 000766 000024 00000000000 12564001461 021425 5ustar00etherstaff000000 000000 MooseX-Daemonize-0.20/lib/MooseX/Daemonize/Pid.pm000600 000766 000024 00000003624 12564001461 021772 0ustar00etherstaff000000 000000 use strict; use warnings; package MooseX::Daemonize::Pid; # ABSTRACT: PID management for MooseX::Daemonize our $VERSION = '0.20'; use Moose; use Moose::Util::TypeConstraints qw(coerce from via); use namespace::autoclean; coerce 'MooseX::Daemonize::Pid' => from 'Int' => via { MooseX::Daemonize::Pid->new( pid => $_ ) }; has 'pid' => ( is => 'rw', isa => 'Int', lazy => 1, clearer => 'clear_pid', predicate => 'has_pid', default => sub { $$ } ); sub is_running { kill(0, (shift)->pid) ? 1 : 0 } 1; __END__ =pod =encoding UTF-8 =head1 NAME MooseX::Daemonize::Pid - PID management for MooseX::Daemonize =head1 VERSION version 0.20 =head1 DESCRIPTION This is a very basic Pid management object, it doesn't do all that much, and mostly just serves as a base class for L. =head1 NAME =head1 ATTRIBUTES =over 4 =item I =back =head1 METHODS =over 4 =item B This will clear the value of the I attribute. It is useful for making sure that the parent process does not have a bad value stored in it. =item B This is a predicate method to tell you if your I attribute has been initialized yet. =item B This checks to see if the I is running. =item meta() The C method from L =back =head1 DEPENDENCIES Obviously L =head1 BUGS AND LIMITATIONS Please report any bugs or feature requests to C, or through the web interface at L. =head1 AUTHORS =over 4 =item * Stevan Little =item * Chris Prather =back =head1 COPYRIGHT AND LICENCE This software is copyright (c) 2007 by Chris Prather. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut MooseX-Daemonize-0.20/lib/MooseX/Daemonize/WithPidFile.pm000600 000766 000024 00000006175 12564001461 023432 0ustar00etherstaff000000 000000 use strict; use warnings; package MooseX::Daemonize::WithPidFile; # ABSTRACT: A Role with the core daemonization and pidfile management our $VERSION = '0.20'; use MooseX::Getopt; # to load the Getopt metaclass use Moose::Role; use namespace::autoclean; use MooseX::Daemonize::Pid::File; with 'MooseX::Daemonize::Core'; requires 'init_pidfile'; has pidfile => ( # NOTE: # this should always be accessible # from the command line IMO # - SL metaclass => 'Getopt', isa => 'MooseX::Daemonize::Pid::File', is => 'rw', lazy => 1, coerce => 1, predicate => 'has_pidfile', builder => 'init_pidfile', ); after 'daemonize' => sub { my $self = shift; # NOTE: # make sure that we do not have # any bad PID values stashed around # - SL $self->pidfile->clear_pid; if ($self->is_daemon) { $self->pidfile->write; } }; 1; __END__ =pod =encoding UTF-8 =head1 NAME MooseX::Daemonize::WithPidFile - A Role with the core daemonization and pidfile management =head1 VERSION version 0.20 =head1 SYNOPSIS package My::Daemon; use Moose; with 'MooseX::Daemonize::WithPidFile'; sub start { my $self = shift; # daemonize me ... $self->daemonize; # << this will write the pidfile for you # return from the parent,... return unless $self->is_daemon; # but continue on in the child (daemon) } =head1 DESCRIPTION This is a slightly extended basic daemonization Role, it provides Pidfile management along with the core daemonization features found in L. =head1 ATTRIBUTES =over =item I rw, isa => MooseX::Daemonize::Pid::File)> This attribute holds the L object used to manage the Pidfile. It will initialize the object using the C method (which is required by this role). =back =head1 REQUIRED METHODS =over 4 =item I This method is used to build the I attribute's object. It should return a L object. =item B This is a predicate method to tell you if your I attribute has been initialized yet. =back =head1 METHODS =over 4 =item B This adds an C method modifier to the C method (from L) and handles writing your Pidfile for you. =item B The C method from L =back =head1 DEPENDENCIES L, L and L =head1 BUGS AND LIMITATIONS Please report any bugs or feature requests to C, or through the web interface at L. =head1 AUTHORS =over 4 =item * Stevan Little =item * Chris Prather =back =head1 COPYRIGHT AND LICENCE Copyright (c) 2007-2011, Chris Prather C<< >>. All rights reserved. Portions heavily borrowed from L which is copyright Earl Hood. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L. =cut MooseX-Daemonize-0.20/lib/MooseX/Daemonize/Pid/File.pm000600 000766 000024 00000006565 12564001461 022660 0ustar00etherstaff000000 000000 use strict; use warnings; package MooseX::Daemonize::Pid::File; # ABSTRACT: PID file management for MooseX::Daemonize our $VERSION = '0.20'; use Moose; use Moose::Util::TypeConstraints qw(coerce from via); use MooseX::Types::Path::Class; use MooseX::Getopt::OptionTypeMap; use namespace::autoclean; # NOTE: # set up some basic coercions # that will come in handy # - SL coerce 'MooseX::Daemonize::Pid::File' => from 'Str' => via { MooseX::Daemonize::Pid::File->new( file => $_ ) } => from 'ArrayRef' => via { MooseX::Daemonize::Pid::File->new( file => $_ ) } => from 'Path::Class::File' => via { MooseX::Daemonize::Pid::File->new( file => $_ ) }; # NOTE: # make sure this class plays # well with MooseX::Getopt # - SL MooseX::Getopt::OptionTypeMap->add_option_type_to_map( 'MooseX::Daemonize::Pid::File' => '=s', ); extends 'MooseX::Daemonize::Pid'; has '+pid' => ( default => sub { my $self = shift; $self->does_file_exist ? $self->file->slurp(chomp => 1) : $$ } ); has 'file' => ( is => 'ro', isa => 'Path::Class::File', coerce => 1, required => 1, handles => [ 'remove' ] ); sub does_file_exist { -s (shift)->file } sub write { my $self = shift; my $fh = $self->file->openw; $fh->print($self->pid . "\n"); $fh->close; } override 'is_running' => sub { return 0 unless (shift)->does_file_exist; super(); }; 1; __END__ =pod =encoding UTF-8 =head1 NAME MooseX::Daemonize::Pid::File - PID file management for MooseX::Daemonize =head1 VERSION version 0.20 =head1 DESCRIPTION This object extends L to add persistence in a Pidfile. This class sets up some basic coercion routines for itself so that it can be created from a I (a file name), I (an array of path components for a filename) or a I object. This class registers it's type with L as well, and is expected to be passed on the command line as a string (which will then go through the coercion routines mentioned above). =head1 ATTRIBUTES =over =item I This is inherited from L and extended here to get it's default value from the Pidfile (if available). =item I =back =head1 METHODS =over =item B =item B Both of these methods are inherited from L see that module for more information. =item B This removes the Pidfile. =item B This writes the Pidfile. =item B This checks if the Pidfile exists. =item B This checks if the Pidfile exists, if it does it checks to see if the process is running, if the Pidfile doesn't exist, it returns false. =item meta() The C method from L =back =head1 DEPENDENCIES Obviously L =head1 BUGS AND LIMITATIONS Please report any bugs or feature requests to C, or through the web interface at L. =head1 AUTHORS =over 4 =item * Stevan Little =item * Chris Prather =back =head1 COPYRIGHT AND LICENCE This software is copyright (c) 2007 by Chris Prather. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut MooseX-Daemonize-0.20/lab/dec.pl000755 000766 000024 00000001044 12564001461 016660 0ustar00etherstaff000000 000000 #!/usr/bin/env perl -l package TestDaemon; use Moose; with('MooseX::Daemonize'); before 'daemonize' => sub { warn 'forking ' . $$; }; after 'start' => sub { return unless $_[0]->is_daemon; while (1) { local *LOG; open LOG, '>>', '/tmp/testdaemon.log'; print LOG "$0:$$"; close LOG; sleep 1; } }; package main; my $td = new_with_options TestDaemon( pidbase => '/tmp' ); use YAML; warn Dump $td->pidfile; warn $td->check; print "PARENT: $$"; print 'PID: ' . $td->get_pid; print $td->start; MooseX-Daemonize-0.20/examples/moose_room.pl000644 000766 000024 00000005321 12564001461 021362 0ustar00etherstaff000000 000000 package MooseRoom; use strict; our $VERSION = '0.0.1'; use Moose; use POE qw(Component::Server::IRC); with qw(MooseX::Getopt); with qw(MooseX::Daemonize); has servername => ( isa => 'Str', is => 'ro', default => sub { 'moose.room' }, ); has nicklen => ( isa => 'Int', is => 'ro', default => sub { 15 }, ); has network => ( isa => 'Str', is => 'ro', default => sub { 'MooseRoom' }, ); has ircd => ( isa => 'POE::Component::Server::IRC', is => 'ro', lazy => 1, default => sub { POE::Component::Server::IRC->spawn( { servername => $_[0]->servername, nicklen => $_[0]->nicklen, network } ); }, ); has operators => ( isa => 'ArrayRef', is => 'ro', auto_deref => 1, default => sub { [ { username => 'perigrin', password => 'hobbit' }, ]; }, ); sub BUILD { my ($self) = @_; POE::Session->create( object_states => [ $self => [qw(_start _default)], ], ); } sub _start { my ( $self, $kernel, $heap ) = @_[ OBJECT, KERNEL, HEAP ]; $self->ircd->yield('register'); # Anyone connecting from the loopback gets spoofed hostname $self->ircd->add_auth( mask => '*@localhost', spoof => $self->hostname, no_tilde => 1 ); # We have to add an auth as we have specified one above. $self->ircd->add_auth( mask => '*@*' ); # Start a listener on the 'standard' IRC port. $self->ircd->add_listener( port => 6667 ); # Add an operator who can connect from localhost $self->ircd->add_operator($_) for $self->operators; return; } sub _default { my ( $event, $args ) = @_[ ARG0 .. $#_ ]; print STDOUT "$event: "; foreach (@$args) { SWITCH: { if ( ref($_) eq 'ARRAY' ) { print STDOUT "[", join( ", ", @$_ ), "] "; last SWITCH; } if ( ref($_) eq 'HASH' ) { print STDOUT "{", join( ", ", %$_ ), "} "; last SWITCH; } print STDOUT "'$_' "; } } print STDOUT "\n"; return 0; # Don't handle signals. } before new => sub { POE::Kernel->run(); }; after start => sub { POE::Kernel->run(); }; unless ( caller() ) { require Cwd; my $cmd = lc $ARGV[-1]; my $app = MooseRoom->new_with_options( pidbase => Cwd::cwd() ); print STDERR "trying to $cmd server\n"; if ( $cmd eq 'start' ) { print STDERR qq{ pidfile: @{ [ $app->pidfile ] } port: @{ [ $app->Port ] } }; } $app->$cmd; } no Moose; 1; # Magic true value required at end of module __END__