Skip Menu |

This queue is for tickets about the Catalyst-Plugin-Log-Handler CPAN distribution.

Report information
The Basics
Id: 53347
Status: resolved
Priority: 0/
Queue: Catalyst-Plugin-Log-Handler

People
Owner: Nobody in particular
Requestors: Support [...] RoxSoft.co.uk
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.07
Fixed in: (no value)



Subject: New release required for Catalyst 5.8
Since Catalyst moved to Moose at 5.8 some things have been deprecated, e.g. use NEXT;

I attach the patches for CPLH that switch from NEXT to MRO::Compat and
update the call to the Log::Handler constructor, it now has a different
format

Subject: work.diff
--- t/work.t 2009-11-26 18:19:30.000000000 +0000 +++ t/work.t 2009-11-26 18:53:40.000000000 +0000 @@ -18,46 +18,33 @@ { package Catalyst::Plugin::Log::Handler::Test; - use base qw(Class::Accessor::Fast Catalyst::Plugin::Log::Handler); + use base qw( Catalyst::Plugin::Log::Handler Class::Accessor::Fast); __PACKAGE__->mk_accessors(qw(log config)); -} - -my $c = Catalyst::Plugin::Log::Handler::Test->new({ - config => { - 'Log::Handler' => { - filename => \*STDOUT, - mode => 'append', - newline => 1, - }, - }, - }); - -$c->setup(); +} -my $pipe; +my $c = Catalyst::Plugin::Log::Handler::Test->new(); -my $pid = open $pipe, '-|'; -defined $pid or die $!; +$c->config( { + 'Log::Handler' => { + filename => 't/log-handler-test', + mode => 'append', + newline => 1, + }, +}); -unless ($pid) { - require Catalyst::Plugin::Log::Handler; +$c->setup(); - for my $level (LEVELS) { - $c->log->$level("This is a $level test message."); - } - $c->log->handler->crit('This is a crit test message.'); - - exit(0); +for my $level (LEVELS) { + $c->log->$level("This is a $level test message."); } -my $logtext = do {local $/; <$pipe>}; -defined $logtext or die $!; +$c->log->handler->crit('This is a crit test message.'); -print "This was logged: (\n$logtext)\n"; +my $logtext = do {local $/; open FH, '<t/log-handler-test'; <FH> }; -close $pipe or die "Child exit status: $?\n"; +defined $logtext or die $!; my $numberlevels = () = LEVELS;
Subject: Log::Handler.diff
--- Catalyst/Plugin/Log/Handler.pm 2009-11-26 18:08:37.000000000 +0000 +++ Catalyst/Plugin/Log/Handler.pm 2009-11-26 18:14:08.000000000 +0000 @@ -8,13 +8,13 @@ =head1 VERSION -Version 0.07 +Version 0.08 =cut -our $VERSION = '0.07'; +our $VERSION = '0.08'; -use NEXT; +use MRO::Compat; sub setup { my $c = shift; @@ -23,7 +23,7 @@ $c->log((__PACKAGE__ . '::Backend')->new($config)); - return $c->NEXT::setup(@_); + return $c->next::method(@_); } @@ -31,7 +31,8 @@ use strict; use warnings; use base qw(Class::Accessor::Fast); -use Log::Handler 0.33; +use Log::Handler 0.63; +use MRO::Compat; __PACKAGE__->mk_accessors(qw(handler)); @@ -68,7 +69,7 @@ sub new { my $class = shift; - my $self = $class->SUPER::new; + my $self = $class->next::method(); my ($config) = @_; @@ -80,11 +81,11 @@ # Log::Handler->new will fail if there's no filename in the conf. But let's # try it anyway to convince the user. - $self->handler(Log::Handler->new( + $self->handler(Log::Handler->new( file => { minlevel => 0, maxlevel => 7, %$config, - )); + } )); return $self; } @@ -100,10 +101,11 @@ Catalyst configuration (e. g. in YAML format): Log::Handler: - filename: /var/log/myapp.log - fileopen: 1 - mode: append - newline: 1 + file: + filename: /var/log/myapp.log + fileopen: 1 + mode: append + newline: 1 To log a message:
From: felix.ostmann [...] thewar.de
Am Mo 04. Jan 2010, 13:49:09, PJFL schrieb: Show quoted text
> Since Catalyst moved to Moose at 5.8 some things have been deprecated, > e.g. use > NEXT; > > I attach the patches for CPLH that switch from NEXT to MRO::Compat and > update the call to the Log::Handler constructor, it now has a > different > format
With the new version of Log::Handler this modul failed a test: t/work.t .......... Can't locate Log/Handler/Output/Minlevel.pm in @INC (@INC contains: /home/user/.cpan/build/Catalyst-Plugin-Log-Handler-0.07-YWLusH/blib/lib /home/user/.cpan/build/Catalyst-Plugin-Log-Handler-0.07-YWLusH/blib/arch /home/user/perl5lib/lib/5.10.1/x86_64-linux /home/user/perl5lib/lib/5.10.1 /home/user/perl5lib/lib/site_perl/5.10.1/x86_64-linux /home/user/perl5lib/lib/site_perl/5.10.1 .) at (eval 14) line 3. at /home/user/.cpan/build/Catalyst-Plugin-Log-Handler-0.07-YWLusH/blib/lib/Catalyst/Plugin/Log/Handler.pm line 83
RT-Send-CC: modules [...] perl.org, felix.ostmann [...] thewar.de
I sent you the attached email some months ago. Would really like to see this module patched and updated. If I don't hear back I'll follow the course suggested here http://www.cpan.org/misc/cpan-faq.html#How_adopt_module
Subject: Catalyst::Plugin::Log::Handler Ticket 53347.eml
Date: Tue, 03 Aug 2010 20:05:24 +0100 To: pepe@cpan.org Subject: Catalyst::Plugin::Log::Handler Ticket 53347 Hi, I raised RT 53347 against this distribution a few months ago. I've included the patch necessary to bring the module up to date. I would be willing to apply the patch and release a new version if you grant me co-maint -- Regards
The 0.07_01 release resolves the issue. Just needs dependency change in Build.PL and version bump. Many thanks
Fixed in 0.08.