r57373 - in /branches/upstream/libmoosex-log-log4perl-perl/current: Changes MANIFEST META.yml Makefile.PL lib/MooseX/Log/Log4perl.pm lib/MooseX/Log/Log4perl/Easy.pm t/99bench.t t/perl-critic.t t/perlcriticrc t/pod.t t/podcoverage.t
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Mon May 3 13:39:09 UTC 2010
Author: jawnsy-guest
Date: Mon May 3 13:38:42 2010
New Revision: 57373
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=57373
Log:
[svn-upgrade] Integrating new upstream version, libmoosex-log-log4perl-perl (0.42)
Added:
branches/upstream/libmoosex-log-log4perl-perl/current/t/perl-critic.t
branches/upstream/libmoosex-log-log4perl-perl/current/t/perlcriticrc
branches/upstream/libmoosex-log-log4perl-perl/current/t/podcoverage.t
Modified:
branches/upstream/libmoosex-log-log4perl-perl/current/Changes
branches/upstream/libmoosex-log-log4perl-perl/current/MANIFEST
branches/upstream/libmoosex-log-log4perl-perl/current/META.yml
branches/upstream/libmoosex-log-log4perl-perl/current/Makefile.PL
branches/upstream/libmoosex-log-log4perl-perl/current/lib/MooseX/Log/Log4perl.pm
branches/upstream/libmoosex-log-log4perl-perl/current/lib/MooseX/Log/Log4perl/Easy.pm
branches/upstream/libmoosex-log-log4perl-perl/current/t/99bench.t
branches/upstream/libmoosex-log-log4perl-perl/current/t/pod.t
Modified: branches/upstream/libmoosex-log-log4perl-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-log-log4perl-perl/current/Changes?rev=57373&op=diff
==============================================================================
--- branches/upstream/libmoosex-log-log4perl-perl/current/Changes (original)
+++ branches/upstream/libmoosex-log-log4perl-perl/current/Changes Mon May 3 13:38:42 2010
@@ -1,22 +1,38 @@
Revision history for MooseX::Log::Log4perl
- Added t/99bench.t for basic benchmark testing
+0.42 Thu Apr 29 2010 (again)
+ * Remove Log::Any from benchmark tests, we want to avoid failing tests
+
+0.41 Thu Apr 29 2010
+ * Added POD::Covergage test (t/podcoverage.t)
+ * Added Perl::Critic test (t/pelr-critic.t)
+ * RT#57021: Raised dependency to Log::Log4perl 1.13 which first introduced the TRACE level (thanks Sam Vilain)
+ * Raise dependency for Moose to 0.65, which has fixes for Win32 Builds
+ * Updated Module::Install to 0.94
+ * Raise required perl version to 5.8
+
+0.40 Sun May 17 2009
+ * #45554: Applied patch for easy method handling for %M pattern by Tim Bunce
+ * Added t/99bench.t for basic benchmark testing
+ * Added load test of ::Easy and diag printing of version numbers to t/00load.t
+ * Updated included Module::Install to 0.88
+ * Improved tests to include %M pattern
+ * Only do the benchmark test for TEST_MAINT is set, otherwise skip
0.31 Mon Jul 21 2008
- Fixed bug reported by Maik Hentsche
+ * Fixed bug reported by Maik Hentsche
0.30 Tue Jul 15 2008
- Corrected MANIFEST (added MANIFEST.SKIP to generate it correctly now)
- Improved pod and fixed typo in MooseX::Log::Log4perl::Easy
- Cleanup of tests and pod
- Repackage as 0.30 to fix failing cpan tests (and fix perl module version numbering for CPAN)
+ * Corrected MANIFEST (added MANIFEST.SKIP to generate it correctly now)
+ * Improved pod and fixed typo in MooseX::Log::Log4perl::Easy
+ * Cleanup of tests and pod
+ * Repackage as 0.30 to fix failing cpan tests (and fix perl module version numbering for CPAN)
0.2 Mon Jul 14 2008
- Added MooseX::Log::Log4perl::Easy for simple log interface
- this adds methods $self->log_error, $self->log_debug, ... for all log levels
- Cleanup of tests and pod
+ * Added MooseX::Log::Log4perl::Easy for simple log interface
+ this adds methods $self->log_error, $self->log_debug, ... for all log levels
+ * Cleanup of tests and pod
0.1 Thu Jul 10 2008
- Initial release with support for log4perl logging. (Roland Lammel)
- Logger init has to be done outside of this package for now.
-
+ * Initial release with support for log4perl logging. (Roland Lammel)
+ * Logger init has to be done outside of this package for now.
Modified: branches/upstream/libmoosex-log-log4perl-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-log-log4perl-perl/current/MANIFEST?rev=57373&op=diff
==============================================================================
--- branches/upstream/libmoosex-log-log4perl-perl/current/MANIFEST (original)
+++ branches/upstream/libmoosex-log-log4perl-perl/current/MANIFEST Mon May 3 13:38:42 2010
@@ -20,4 +20,7 @@
t/01basic.t
t/02easy.t
t/99bench.t
+t/perl-critic.t
+t/perlcriticrc
t/pod.t
+t/podcoverage.t
Modified: branches/upstream/libmoosex-log-log4perl-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-log-log4perl-perl/current/META.yml?rev=57373&op=diff
==============================================================================
--- branches/upstream/libmoosex-log-log4perl-perl/current/META.yml (original)
+++ branches/upstream/libmoosex-log-log4perl-perl/current/META.yml Mon May 3 13:38:42 2010
@@ -9,7 +9,7 @@
configure_requires:
ExtUtils::MakeMaker: 6.42
distribution_type: module
-generated_by: 'Module::Install version 0.88'
+generated_by: 'Module::Install version 0.94'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -20,8 +20,9 @@
- inc
- t
requires:
- Log::Log4perl: 0
- Moose: 0
+ Log::Log4perl: 1.13
+ Moose: 0.65
+ perl: 5.8.0
resources:
license: http://dev.perl.org/licenses/
-version: 0.40
+version: 0.41
Modified: branches/upstream/libmoosex-log-log4perl-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-log-log4perl-perl/current/Makefile.PL?rev=57373&op=diff
==============================================================================
--- branches/upstream/libmoosex-log-log4perl-perl/current/Makefile.PL (original)
+++ branches/upstream/libmoosex-log-log4perl-perl/current/Makefile.PL Mon May 3 13:38:42 2010
@@ -6,8 +6,8 @@
build_requires 'IO::Scalar';
build_requires 'Test::More';
-requires 'Moose';
-requires 'Log::Log4perl';
+requires 'Moose' => 0.65;
+requires 'Log::Log4perl' => 1.13;
auto_install;
WriteAll;
Modified: branches/upstream/libmoosex-log-log4perl-perl/current/lib/MooseX/Log/Log4perl.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-log-log4perl-perl/current/lib/MooseX/Log/Log4perl.pm?rev=57373&op=diff
==============================================================================
--- branches/upstream/libmoosex-log-log4perl-perl/current/lib/MooseX/Log/Log4perl.pm (original)
+++ branches/upstream/libmoosex-log-log4perl-perl/current/lib/MooseX/Log/Log4perl.pm Mon May 3 13:38:42 2010
@@ -1,19 +1,20 @@
package MooseX::Log::Log4perl;
+use 5.008;
use Moose::Role;
use Log::Log4perl;
-our $VERSION = '0.40';
+our $VERSION = '0.42';
has 'logger' => (
is => 'rw',
isa => 'Log::Log4perl::Logger',
lazy => 1,
- default => sub { my $self = shift; return Log::Log4perl->get_logger(ref($self)) }
+ default => sub { return Log::Log4perl->get_logger(ref($_[0])) }
);
sub log {
- return Log::Log4perl->get_logger($_[1]) if ($_[1] && !ref($_[1]));
+ return Log::Log4perl->get_logger($_[1]) if ($_[1] && !ref($_[1]));
return $_[0]->logger;
}
@@ -24,10 +25,6 @@
=head1 NAME
MooseX::Log::Log4perl - A Logging Role for Moose based on Log::Log4perl
-
-=head1 VERSION
-
-This document describes MooseX::Log::Log4perl version 0.30
=head1 SYNOPSIS
@@ -110,11 +107,21 @@
Inspired by the work by Chris Prather C<< <perigrin at cpan.org> >> and Ash
Berlin C<< <ash at cpan.org> >> on L<MooseX::LogDispatch>
-Thanks to Michael Schilli C<< <m at perlmeister.com> >> for L<Log::Log4perl> and suggestions in the interface.
+=head1 CONTRIBUTORS
+
+In alphabetical order:
+
+=over 2
+
+=item Michael Schilli C<< <m at perlmeister.com> >> for L<Log::Log4perl> and suggestions in the interface.
+
+=item Tim Bunce C<< <TIMB at cpan.org> >> for corrections in the L<MooseX::Log::Log4perl::Easy> module.
+
+=back
=head1 LICENCE AND COPYRIGHT
-Copyright (c) 2008-2009, Roland Lammel C<< <lammel at cpan.org> >>, http://www.quikit.at. Some rights reserved.
+Copyright (c) 2008-2010, Roland Lammel C<< <lammel at cpan.org> >>, http://www.quikit.at. Some rights reserved.
This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself. See L<perlartistic>.
Modified: branches/upstream/libmoosex-log-log4perl-perl/current/lib/MooseX/Log/Log4perl/Easy.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-log-log4perl-perl/current/lib/MooseX/Log/Log4perl/Easy.pm?rev=57373&op=diff
==============================================================================
--- branches/upstream/libmoosex-log-log4perl-perl/current/lib/MooseX/Log/Log4perl/Easy.pm (original)
+++ branches/upstream/libmoosex-log-log4perl-perl/current/lib/MooseX/Log/Log4perl/Easy.pm Mon May 3 13:38:42 2010
@@ -4,14 +4,14 @@
with 'MooseX::Log::Log4perl';
-our $VERSION = '0.40';
+our $VERSION = '0.41';
-sub log_fatal { local $Log::Log4perl::caller_depth += 1; shift->logger->fatal(@_); }
-sub log_error { local $Log::Log4perl::caller_depth += 1; shift->logger->error(@_); }
-sub log_warn { local $Log::Log4perl::caller_depth += 1; shift->logger->warn(@_); }
-sub log_info { local $Log::Log4perl::caller_depth += 1; shift->logger->info(@_); }
-sub log_debug { local $Log::Log4perl::caller_depth += 1; shift->logger->debug(@_); }
-sub log_trace { local $Log::Log4perl::caller_depth += 1; shift->logger->trace(@_); }
+sub log_fatal { local $Log::Log4perl::caller_depth += 1; return shift->logger->fatal(@_); }
+sub log_error { local $Log::Log4perl::caller_depth += 1; return shift->logger->error(@_); }
+sub log_warn { local $Log::Log4perl::caller_depth += 1; return shift->logger->warn(@_); }
+sub log_info { local $Log::Log4perl::caller_depth += 1; return shift->logger->info(@_); }
+sub log_debug { local $Log::Log4perl::caller_depth += 1; return shift->logger->debug(@_); }
+sub log_trace { local $Log::Log4perl::caller_depth += 1; return shift->logger->trace(@_); }
1;
@@ -19,11 +19,7 @@
=head1 NAME
-MooseX::Log::Log4perl::Easy - A Logging Role with easy interface for Moose based on L<MooseX::Log::Log4perl>
-
-=head1 VERSION
-
-This document describes MooseX::Log::Log4perl::Easy version 0.31
+MooseX::Log::Log4perl::Easy - A role for easy usage of logging in your Moose based modules based on L<MooseX::Log::Log4perl>
=head1 SYNOPSIS
@@ -54,7 +50,7 @@
without having to access a seperate log attribute as in MooseX::Log::Log4perl;
In case your app grows and you need more of the super-cow powers of Log4perl or simply don't want the additional
-methodes to clutter up your class you can simply replace all code C<< $self->log_LEVEL >> with
+methods to clutter up your class you can simply replace all code C<< $self->log_LEVEL >> with
C<< $self->log->LEVEL >>.
You can use the following regex substitution to accomplish that:
@@ -129,7 +125,7 @@
=head1 LICENCE AND COPYRIGHT
-Copyright (c) 2008-2009, Roland Lammel C<< <lammel at cpan.org> >>, http://www.quikit.at. Some rights reserved.
+Copyright (c) 2008-2010, Roland Lammel C<< <lammel at cpan.org> >>, http://www.quikit.at. Some rights reserved.
This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself. See L<perlartistic>.
Modified: branches/upstream/libmoosex-log-log4perl-perl/current/t/99bench.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-log-log4perl-perl/current/t/99bench.t?rev=57373&op=diff
==============================================================================
--- branches/upstream/libmoosex-log-log4perl-perl/current/t/99bench.t (original)
+++ branches/upstream/libmoosex-log-log4perl-perl/current/t/99bench.t Mon May 3 13:38:42 2010
@@ -8,7 +8,7 @@
use vars qw($tmplogfile);
use Test::More;
-plan skip_all => "Set TEST_MAINT=1 if benchmark should be run with the testsuite" unless $ENV{TEST_MAINT};
+plan skip_all => 'Author test. Set $ENV{TEST_AUTHOR} to run benchmark tests' unless $ENV{TEST_AUTHOR};
plan tests => 6;
BEGIN { $tmplogfile = 'mxll4p_benchtest.log'; }
@@ -17,7 +17,7 @@
unlink($tmplogfile) if (-f $tmplogfile);
}
-{
+{
### Define a custom Log4perl appender that simply does not log anything
### as we only need to check on call performance not actuall performance
### of the appender
@@ -31,7 +31,7 @@
use Moose;
with 'MooseX::Log::Log4perl';
-
+
sub testlog { shift->log->info("Just a test for logging"); }
sub testlogger { shift->logger->info("Just a test for logging"); }
__PACKAGE__->meta->make_immutable;
@@ -42,9 +42,9 @@
use Log::Log4perl;
use vars qw($log);
-
+
BEGIN { $log = Log::Log4perl->get_logger(__PACKAGE__); }
-
+
sub new { bless({log=>$log},__PACKAGE__); }
sub log { return shift->{log}; };
@@ -63,22 +63,15 @@
log4perl.appender.Nirvana.layout.ConversionPattern = %p [%c] %m%n
__ENDCFG__
Log::Log4perl->init(\$cfg);
-
+
my $mxl = new BenchMooseXLogLog4perl();
my $llp = new BenchLogLog4perl();
-
+
isa_ok( $mxl, 'BenchMooseXLogLog4perl', 'Bench instance for MooseX::Log::Log4perl');
isa_ok( $llp, 'BenchLogLog4perl', 'Bench instance for Log::Log4perl');
- # my $bllp1 = Benchmark::timeit(100000, sub { $llp->testlog() });
- # diag(timestr($bllp1));
- # my $bllp2 = Benchmark::timeit(100000, sub { $llp->testlogobj() });
- # diag(timestr($bllp2));
- # my $bmxl1 = Benchmark::timeit(100000, sub { $mxl->testlog() });
- # diag(timestr($bmxl1));
- # my $bmxl2 = Benchmark::timeit(100000, sub { $mxl->testlogger() });
- # diag(timestr($bmxl2));
- ### We expect some bsaic performance of approx. 10% to Log4perl directly
+ ### We expect some basic performance of approx. 95% of Log4perl directly
+ diag("Running benchmarks, please wait a minute...");
my $result = cmpthese(-10, {
'Log4perl direct' => sub { $llp->testlogdirect() },
'Log4perl method' => sub { $llp->testlogmethod() },
@@ -102,10 +95,10 @@
"(%i / %i = %.2f %%) to Log4perl direct", $bench{'MooseX-L4p logger'}, $bench{'Log4perl direct'}, $rate_log));
$rate_logger = 100 * $bench{'MooseX-L4p logger'} / $bench{'Log4perl method'};
- ok($rate_logger > 97, sprintf("Call rate of ->logger must be above 98%% " .
+ ok($rate_logger > 97, sprintf("Call rate of ->logger must be above 97%% " .
"(%i / %i = %.2f %%) to Log4perl via method", $bench{'MooseX-L4p logger'}, $bench{'Log4perl method'}, $rate_logger));
$rate_log = 100 * $bench{'MooseX-L4p log'} / $bench{'Log4perl method'};
- ok($rate_log > 96, sprintf("Call rate of ->log must be above 97%% " .
+ ok($rate_log > 96, sprintf("Call rate of ->log must be above 96%% " .
"(%i / %i = %.2f %%) to Log4perl via method", $bench{'MooseX-L4p logger'}, $bench{'Log4perl method'}, $rate_log));
}
Added: branches/upstream/libmoosex-log-log4perl-perl/current/t/perl-critic.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-log-log4perl-perl/current/t/perl-critic.t?rev=57373&op=file
==============================================================================
--- branches/upstream/libmoosex-log-log4perl-perl/current/t/perl-critic.t (added)
+++ branches/upstream/libmoosex-log-log4perl-perl/current/t/perl-critic.t Mon May 3 13:38:42 2010
@@ -1,0 +1,21 @@
+use strict;
+use warnings;
+use File::Spec;
+use Test::More;
+use English qw(-no_match_vars);
+
+if ( not($ENV{TEST_AUTHOR} || $ENV{TEST_CRITIC}) ) {
+ my $msg = 'Author test. Set $ENV{TEST_AUTHOR} to a true value to run.';
+ plan( skip_all => $msg );
+}
+
+eval { require Test::Perl::Critic; };
+
+if ( $EVAL_ERROR ) {
+ my $msg = 'Test::Perl::Critic required to criticise code';
+ plan( skip_all => $msg );
+}
+
+my $rcfile = File::Spec->catfile( 't', 'perlcriticrc' );
+Test::Perl::Critic->import( -profile => $rcfile );
+all_critic_ok();
Added: branches/upstream/libmoosex-log-log4perl-perl/current/t/perlcriticrc
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-log-log4perl-perl/current/t/perlcriticrc?rev=57373&op=file
==============================================================================
--- branches/upstream/libmoosex-log-log4perl-perl/current/t/perlcriticrc (added)
+++ branches/upstream/libmoosex-log-log4perl-perl/current/t/perlcriticrc Mon May 3 13:38:42 2010
@@ -1,0 +1,9 @@
+severity = harsh
+# only = 1
+# force = 0
+verbose = 4
+# top = 50
+theme = core
+# include = NamingConventions ClassHierarchies #Space-delimited list
+exclude = Subroutines::RequireArgUnpacking Subroutines::RequireFinalReturn Subroutines::ProhibitBuiltinHomonyms Variables::RequireInitializationForLocalVars
+# criticism-fatal = 1 #Zero or One
Modified: branches/upstream/libmoosex-log-log4perl-perl/current/t/pod.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-log-log4perl-perl/current/t/pod.t?rev=57373&op=diff
==============================================================================
--- branches/upstream/libmoosex-log-log4perl-perl/current/t/pod.t (original)
+++ branches/upstream/libmoosex-log-log4perl-perl/current/t/pod.t Mon May 3 13:38:42 2010
@@ -1,6 +1,9 @@
-#!perl
+use strict;
+use warnings;
+use Test::More;
-use Test::More;
eval "use Test::Pod 1.14";
-plan skip_all => "Test::Pod 1.14 required for testing POD" if $@;
+plan skip_all => 'Test::Pod 1.14 required' if $@;
+plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
+
all_pod_files_ok();
Added: branches/upstream/libmoosex-log-log4perl-perl/current/t/podcoverage.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-log-log4perl-perl/current/t/podcoverage.t?rev=57373&op=file
==============================================================================
--- branches/upstream/libmoosex-log-log4perl-perl/current/t/podcoverage.t (added)
+++ branches/upstream/libmoosex-log-log4perl-perl/current/t/podcoverage.t Mon May 3 13:38:42 2010
@@ -1,0 +1,9 @@
+use strict;
+use warnings;
+use Test::More;
+
+eval "use Test::Pod::Coverage 1.04";
+plan skip_all => 'Test::Pod::Coverage 1.04 required' if $@;
+plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
+
+all_pod_coverage_ok();
More information about the Pkg-perl-cvs-commits
mailing list