commit perl-MooseX-Log-Log4perl for openSUSE:Factory
Hello community, here is the log from the commit of package perl-MooseX-Log-Log4perl for openSUSE:Factory checked in at 2011-12-21 10:02:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-MooseX-Log-Log4perl (Old) and /work/SRC/openSUSE:Factory/.perl-MooseX-Log-Log4perl.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "perl-MooseX-Log-Log4perl", Maintainer is "" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-MooseX-Log-Log4perl/perl-MooseX-Log-Log4perl.changes 2011-09-23 12:38:11.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.perl-MooseX-Log-Log4perl.new/perl-MooseX-Log-Log4perl.changes 2011-12-21 10:02:27.000000000 +0100 @@ -1,0 +2,7 @@ +Tue Dec 20 09:16:15 UTC 2011 - coolo@suse.com + +- update to 0.43 + * Change to use Any::Moose to also support Mouse environemnt + * Documentation improvements for Any::Moose + +------------------------------------------------------------------- Old: ---- MooseX-Log-Log4perl-0.42.tar.bz2 New: ---- MooseX-Log-Log4perl-0.43.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-MooseX-Log-Log4perl.spec ++++++ --- /var/tmp/diff_new_pack.yEoZ3p/_old 2011-12-21 10:02:28.000000000 +0100 +++ /var/tmp/diff_new_pack.yEoZ3p/_new 2011-12-21 10:02:28.000000000 +0100 @@ -16,24 +16,34 @@ # - Name: perl-MooseX-Log-Log4perl -Version: 0.42 -Release: 1 -License: GPL+ or Artistic +Version: 0.43 +Release: 0 %define cpan_name MooseX-Log-Log4perl Summary: A Logging Role for Moose based on Log::Log4perl -Url: http://search.cpan.org/dist/MooseX-Log-Log4perl/ +License: Artistic-1.0 or GPL-1.0+ Group: Development/Libraries/Perl -#Source: http://www.cpan.org/authors/id/L/LA/LAMMEL/MooseX-Log-Log4perl-%{version}.tar.gz -Source: %{cpan_name}-%{version}.tar.bz2 +Url: http://search.cpan.org/dist/MooseX-Log-Log4perl/ +Source: http://www.cpan.org/authors/id/L/LA/LAMMEL/%{cpan_name}-%{version}.tar.gz BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros +BuildRequires: perl(Any::Moose) BuildRequires: perl(IO::Scalar) BuildRequires: perl(Log::Log4perl) >= 1.13 BuildRequires: perl(Moose) >= 0.65 +#BuildRequires: perl(CPANPLUS::Backend) +#BuildRequires: perl(inc::Module::Install) +#BuildRequires: perl(Log::Log4perl::Appender::TestBuffer) +#BuildRequires: perl(LWP::Simple) +#BuildRequires: perl(Module::AutoInstall) +#BuildRequires: perl(Module::Build) +#BuildRequires: perl(Module::Install::Base) +#BuildRequires: perl(MooseX::Log::Log4perl) +#BuildRequires: perl(MooseX::Log::Log4perl::Easy) +#BuildRequires: perl(Test::Perl::Critic) +#BuildRequires: perl(YAML::Tiny) Requires: perl(Log::Log4perl) >= 1.13 Requires: perl(Moose) >= 0.65 %{perl_requires} @@ -48,10 +58,29 @@ For compatibility the 'logger' attribute can be accessed to use a common interface for application logging. -For simple logging needs use the MooseX::Log::Log4perl::Easy manpage to -directly add log_<level> methods to your class instance. +Using the logger within a class is as simple as consuming a role: + + package MyClass; + use Moose; + with 'MooseX::Log::Log4perl'; + + sub dummy { + my $self = shift; + $self->log->info("Dummy log entry"); + } - $self->log_info("Dummy"); +The logger needs to be setup before using the logger, which could happen in +the main application: + + package main; + use Log::Log4perl qw(:easy); + use MyClass; + + BEGIN { Log::Log4perl->easy_init() }; + + my $myclass = MyClass->new(); + $myclass->log->info("In my class"); # Access the log of the object + $myclass->dummy; # Will log "Dummy log entry" %prep %setup -q -n %{cpan_name}-%{version} @@ -68,11 +97,8 @@ %perl_process_packlist %perl_gen_filelist -%clean -%{__rm} -rf %{buildroot} - %files -f %{name}.files -%defattr(644,root,root,755) +%defattr(-,root,root,755) %doc Changes README %changelog -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de