Skip Menu |
 

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

Report information
The Basics
Id: 26233
Status: resolved
Priority: 0/
Queue: Catalyst-Plugin-Dumper

People
Owner: Nobody in particular
Requestors: yosty [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in:
  • 0.000002
  • v0.0.1
Fixed in: (no value)



Subject: Interoperability problem with Catalyst::Log::Log4perl
Download (untitled) / with headers
text/plain 407b
Catalyst::Plugin::dumper cannot co-exist with Catalyst::Log::Log4perl or Catalyst::Plugin::Log::Dispatch, because Catalyst::Log::dumper was hard-coded. If I use both together, Catalyst die with the following message. Show quoted text
> Caught exception in Calendar::Controller::Member->main "Can't locate > object method "dumper" via package "Catalyst::Log::Log4perl"
I think that a patch attached can solve this problem.
Subject: Dumper.pm.patch
Download Dumper.pm.patch
text/x-diff 1.2k
*** Dumper.pm 2006-01-16 20:46:36.000000000 +0900 --- Dumper.pm.new 2007-04-10 23:54:52.000000000 +0900 *************** *** 10,26 **** use Data::Dumper; $Data::Dumper::Sortkeys = 1; ! sub Catalyst::Log::dumper { ! my ($self, $var, $label) = @_; ! if (defined $label) { ! # temporarily change the Varname that D::D uses ! local $Data::Dumper::Varname = $label; ! $self->debug( Dumper($var) ); ! } ! else { ! $self->debug( Dumper($var) ); ! } } 1; # Magic true value required at end of module --- 10,34 ---- use Data::Dumper; $Data::Dumper::Sortkeys = 1; ! sub setup { ! my $class = shift; ! $class->NEXT::setup(); ! eval( sprintf( <<' EOL', ref $class->log ) ); ! sub %s::dumper { ! my ( $self, $var, $label ) = @_; ! ! if ( defined $label ) { ! ! # temporarily change the Varname that D::D uses ! local $Data::Dumper::Varname = $label; ! $self->debug( Dumper($var) ); ! } ! else { ! $self->debug( Dumper($var) ); ! } ! } ! EOL } 1; # Magic true value required at end of module
As the module is deprecated, so's the bug - I hope.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.