Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Data-Printer CPAN distribution.

Report information
The Basics
Id: 77755
Status: resolved
Priority: 0/
Queue: Data-Printer

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

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Add support for DateTime::TimeZone in Data::Printer::Filter::DateTime
These objects can be massive if you expand their internals - please add support for filtering them in Data::Printer::Filter::DateTime.
Incidentally, when I try to filter DateTime::TimeZone objects myself, I find that using the specific class (DateTime::TimeZone::America::Halifax) will result in my object being filtered - but using DateTime::TimeZone won't (even though it does appear in both "Parents" and "Linear @ISA"). if ($self->{debug}) { require Data::Printer; Data::Printer->import(filters => { -external => [qw/DateTime/], 'DateTime::TimeZone' => sub { "test" }, 'DateTime::TimeZone::America::Halifax' => sub { $_[0]->name }, }); p($self); exit; } I could of course be doing something totally wrong :) -Mike
On Mon Jun 11 12:17:29 2012, DOHERTY wrote: Show quoted text
> These objects can be massive if you expand their internals - please add > support for filtering them in Data::Printer::Filter::DateTime.
Done! btw, filter works only for the actual class, which is why the DateTime::TimeZone::America::Halifax filter worked in your code but the DateTime::TimeZone one didn't. To filter all of DateTime::TimeZone's children, you need to use the '-class' general class filter and test for $obj->isa() Cheers! And thanks for the suggestion :)