From: Stevan Little Date: Wed, 6 Jul 2011 11:39:44 +0000 (-0400) Subject: adding docs, updating version, updating copyright, and release engineering X-Git-Tag: 0.15~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=05b96f4d04d93f2344602f7b3ef43da01c0a2794;p=gitmo%2FMooseX-Daemonize.git adding docs, updating version, updating copyright, and release engineering --- diff --git a/Changes b/Changes index a7a38b1..6e5c4f2 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,12 @@ Revision history for MooseX-Daemonize +0.13 Wed. July 6, 2011 + - 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 Sun. July 11, 2010 - release without the .git directory in it diff --git a/README b/README index 9007a21..7eed700 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -MooseX-Daemonize version 0.12 +MooseX-Daemonize version 0.13 INSTALLATION @@ -17,7 +17,7 @@ DEPENDENCIES COPYRIGHT AND LICENCE -Copyright (C) 2007-2010, Chris Prather +Copyright (C) 2007-2011, Chris Prather This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/lib/MooseX/Daemonize.pm b/lib/MooseX/Daemonize.pm index 2cfa4c3..5c627ba 100644 --- a/lib/MooseX/Daemonize.pm +++ b/lib/MooseX/Daemonize.pm @@ -3,7 +3,7 @@ use strict; # because Kwalitee is pedantic use Moose::Role; use MooseX::Types::Path::Class; -our $VERSION = '0.12'; +our $VERSION = '0.13'; with 'MooseX::Daemonize::WithPidFile', 'MooseX::Getopt'; @@ -342,6 +342,28 @@ Often you want to write a persistant 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 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 @@ -554,7 +576,7 @@ Some bug fixes sponsored by Takkle Inc. =head1 LICENCE AND COPYRIGHT -Copyright (c) 2007-2010, Chris Prather C<< >>. Some rights +Copyright (c) 2007-2011, Chris Prather C<< >>. Some rights reserved. This module is free software; you can redistribute it and/or diff --git a/lib/MooseX/Daemonize/Core.pm b/lib/MooseX/Daemonize/Core.pm index 5b51430..3d7aef4 100644 --- a/lib/MooseX/Daemonize/Core.pm +++ b/lib/MooseX/Daemonize/Core.pm @@ -3,7 +3,7 @@ use strict; # cause Perl::Critic errors are annoying use MooseX::Getopt; # to load the NoGetopt metaclass use Moose::Role; -our $VERSION = '0.12'; +our $VERSION = '0.13'; use POSIX (); @@ -375,7 +375,7 @@ Stevan Little C<< >> =head1 LICENCE AND COPYRIGHT -Copyright (c) 2007-2010, Chris Prather C<< >>. All rights +Copyright (c) 2007-2011, Chris Prather C<< >>. All rights reserved. Portions heavily borrowed from L which is copyright Earl Hood. diff --git a/lib/MooseX/Daemonize/Pid.pm b/lib/MooseX/Daemonize/Pid.pm index bd76a7f..61d7fb3 100644 --- a/lib/MooseX/Daemonize/Pid.pm +++ b/lib/MooseX/Daemonize/Pid.pm @@ -2,7 +2,7 @@ package MooseX::Daemonize::Pid; use strict; # because Kwalitee is pedantic use Moose; use Moose::Util::TypeConstraints; -our $VERSION = '0.12'; +our $VERSION = '0.13'; coerce 'MooseX::Daemonize::Pid' => from 'Int' @@ -89,7 +89,7 @@ Stevan Little C<< >> =head1 LICENCE AND COPYRIGHT -Copyright (c) 2007-2010, Chris Prather C<< >>. All rights +Copyright (c) 2007-2011, Chris Prather C<< >>. All rights reserved. This module is free software; you can redistribute it and/or diff --git a/lib/MooseX/Daemonize/Pid/File.pm b/lib/MooseX/Daemonize/Pid/File.pm index bcade60..fb6b5f3 100644 --- a/lib/MooseX/Daemonize/Pid/File.pm +++ b/lib/MooseX/Daemonize/Pid/File.pm @@ -3,7 +3,7 @@ use strict; # because Kwalitee is pedantic use Moose; use Moose::Util::TypeConstraints; -our $VERSION = '0.12'; +our $VERSION = '0.13'; use MooseX::Types::Path::Class; use MooseX::Getopt::OptionTypeMap; @@ -152,7 +152,7 @@ Stevan Little C<< >> =head1 LICENCE AND COPYRIGHT -Copyright (c) 2007-2010, Chris Prather C<< >>. All rights +Copyright (c) 2007-2011, Chris Prather C<< >>. All rights reserved. This module is free software; you can redistribute it and/or diff --git a/lib/MooseX/Daemonize/WithPidFile.pm b/lib/MooseX/Daemonize/WithPidFile.pm index 3802db6..7aa35c9 100644 --- a/lib/MooseX/Daemonize/WithPidFile.pm +++ b/lib/MooseX/Daemonize/WithPidFile.pm @@ -2,7 +2,7 @@ package MooseX::Daemonize::WithPidFile; use strict; # cause Perl::Critic errors are annoying use MooseX::Getopt; # to load the Getopt metaclass use Moose::Role; -our $VERSION = '0.12'; +our $VERSION = '0.13'; use MooseX::Daemonize::Pid::File; @@ -134,7 +134,7 @@ Stevan Little C<< >> =head1 LICENCE AND COPYRIGHT -Copyright (c) 2007-2010, Chris Prather C<< >>. All rights +Copyright (c) 2007-2011, Chris Prather C<< >>. All rights reserved. Portions heavily borrowed from L which is copyright Earl Hood. diff --git a/lib/Test/MooseX/Daemonize.pm b/lib/Test/MooseX/Daemonize.pm index efee8e5..62eab62 100644 --- a/lib/Test/MooseX/Daemonize.pm +++ b/lib/Test/MooseX/Daemonize.pm @@ -1,7 +1,7 @@ package Test::MooseX::Daemonize; use strict; -our $VERSION = '0.12'; +our $VERSION = '0.13'; our $AUTHORITY = 'cpan:PERIGRIN'; # BEGIN CARGO CULTING @@ -165,7 +165,7 @@ Chris Prather C<< >> =head1 LICENCE AND COPYRIGHT -Copyright (c) 2007-2010, Chris Prather C<< >>. All rights reserved. +Copyright (c) 2007-2011, Chris Prather C<< >>. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L.