Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^3: apply_all_roles method clobbering MooseX::Log::Log4perl

by 1nickt (Canon)
on Jan 18, 2018 at 16:07 UTC ( [id://1207473]=note: print w/replies, xml ) Need Help??


in reply to Re^2: apply_all_roles method clobbering MooseX::Log::Log4perl
in thread apply_all_roles method clobbering MooseX::Log::Log4perl

I have not used Log4Perl nor do I use Moose any more. However, I use Role::Tiny and Moo, and when you apply a Role to an object manually, the object is reblessed into the resultant class, which will have a name something like 'Foo::Bar_WITH_Bar::Baz', so if your logger config is dependent on the class name, that could be the source of the problem.

Things I would think are "pertinent to the question":

  • Does the same behaviour occur when you consume the role with with?
  • Does the same behaviour occur when you apply the role elsewhere than in the BUILD sub? E.g. using after BUILD?
  • Does the same behaviour occur when you create a minimalist test case?
  • Does the same behaviour occur when using Role::Tiny::apply_roles_to_object?
  • Does the same behaviour occur when testing with a role other than the Log4Perl one?

Hope this helps!


The way forward always starts with a minimal test.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1207473]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-04-19 01:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found