Subject: | You are overwriting a locally defined function (get_logger) with an accessor |
Date: | Fri, 04 Feb 2011 21:16:51 +0900 |
To: | bug-moosex-followpbp [...] rt.cpan.org |
From: | Christian Kuelker <christian.kuelker [...] cipworx.org> |
Dear Dave Rolsky,
thank you for writing MooseX::FollowPBP!
I use MooseX::FollowPBP often, but together with MooseX logging
(Log::Log4perl and Log::Dispatch) I got always the error "You are
overwriting a locally defined function (get_logger) with an
accessor". I boiled it down and attached 2 files basically the
synopsis of MooseX::Log::Log4perl::Easy. By using your class the
error occurs, without it do not.
BR
Christian
The complete error message is:
./myapp.pl
You are overwriting a locally defined function (get_logger) with an
accessor at /usr/lib/perl5/Moose/Meta/Attribute.pm line 563
Moose::Meta::Attribute::_process_accessors('Class::MOP::Class::__ANON__::SERIAL::1=HASH(0xa6af580)', 'reader', 'get_logger', undef) called at /usr/lib/perl5/Class/MOP/Attribute.pm line 358
Class::MOP::Attribute::install_accessors('Class::MOP::Class::__ANON__::SERIAL::1=HASH(0xa6af580)') called at /usr/lib/perl5/Moose/Meta/Attribute.pm line 529
Moose::Meta::Attribute::install_accessors('Class::MOP::Class::__ANON__::SERIAL::1=HASH(0xa6af580)') called at /usr/lib/perl5/Class/MOP/Class.pm line 717
Class::MOP::Class::__ANON__() called at
/usr/share/perl5/Try/Tiny.pm line 76
eval {...} called at /usr/share/perl5/Try/Tiny.pm line 67
Try::Tiny::try('CODE(0xa6af6c0)',
'Try::Tiny::Catch=REF(0xa6a5bd0)') called at
/usr/lib/perl5/Class/MOP/Class.pm line 722
Class::MOP::Class::_post_add_attribute('Moose::Meta::Class=HASH(0xa45d1d8)', 'Class::MOP::Class::__ANON__::SERIAL::1=HASH(0xa6af580)') called at /usr/lib/perl5/Class/MOP/Mixin/HasAttributes.pm line 45
Class::MOP::Mixin::HasAttributes::add_attribute('Moose::Meta::Class=HASH(0xa45d1d8)', 'Class::MOP::Class::__ANON__::SERIAL::1=HASH(0xa6af580)') called at /usr/lib/perl5/Moose/Meta/Class.pm line 304
Moose::Meta::Class::add_attribute('Moose::Meta::Class=HASH(0xa45d1d8)', 'Class::MOP::Class::__ANON__::SERIAL::1=HASH(0xa6af580)') called at /usr/lib/perl5/Moose/Meta/Role/Application/ToClass.pm line 142
Moose::Meta::Role::Application::ToClass::apply_attributes('Moose::Meta::Role::Application::ToClass=HASH(0xa229e98)', 'Moose::Meta::Role=HASH(0xa6a2f00)', 'Moose::Meta::Class=HASH(0xa45d1d8)') called at /usr/lib/perl5/Moose/Meta/Role/Application.pm line 72
Moose::Meta::Role::Application::apply('Moose::Meta::Role::Application::ToClass=HASH(0xa229e98)', 'Moose::Meta::Role=HASH(0xa6a2f00)', 'Moose::Meta::Class=HASH(0xa45d1d8)') called at /usr/lib/perl5/Moose/Meta/Role/Application/ToClass.pm line 31
Moose::Meta::Role::Application::ToClass::apply('Moose::Meta::Role::Application::ToClass=HASH(0xa229e98)', 'Moose::Meta::Role=HASH(0xa6a2f00)', 'Moose::Meta::Class=HASH(0xa45d1d8)', 'HASH(0xa6a5c00)') called at /usr/lib/perl5/Moose/Meta/Role.pm line 416
Moose::Meta::Role::apply('Moose::Meta::Role=HASH(0xa6a2f00)',
'Moose::Meta::Class=HASH(0xa45d1d8)') called at
/usr/lib/perl5/Moose/Util.pm line 133
Moose::Util::_apply_all_roles('Moose::Meta::Class=HASH(0xa45d1d8)',
undef, 'MooseX::Log::Log4perl::Easy') called at
/usr/lib/perl5/Moose/Util.pm line 87
Moose::Util::apply_all_roles('Moose::Meta::Class=HASH(0xa45d1d8)',
'MooseX::Log::Log4perl::Easy') called at /usr/lib/perl5/Moose.pm line 58
Moose::with('Moose::Meta::Class=HASH(0xa45d1d8)',
'MooseX::Log::Log4perl::Easy') called at
/usr/lib/perl5/Moose/Exporter.pm line 294
Moose::with('MooseX::Log::Log4perl::Easy') called at MyApp.pm line 6
require MyApp.pm called at ./myapp.pl line 4
main::BEGIN() called at MyApp.pm line 0
eval {...} called at MyApp.pm line 0
Can't locate object method "logger" via package "MyApp" at
/usr/local/share/perl/5.10.1/MooseX/Log/Log4perl/Easy.pm line 13.
Message body is not shown because sender requested not to inline it.
Message body is not shown because sender requested not to inline it.