miyagawa/Plack-Middleware-Debug — pull request #15 by forwardever (2013-02-05 12:56:03+00:00)
Title: fixed warnings

from the author of Devel::TrackObjects

Hi,

$tracked->[0] is the object itself.

If you print it it will stringify it. Stringification is overloaded
in Date::Time using Date::Time::_stringify, which will use ymd and hms
to stringify the object.

If the Date::Time object itself contains no $self->{local_c} yet the
values for sprintf in ymd and hms will be undef which causes the
warnings.

So this is not really a bug in DateTime, because they never intended
for somebody to stringify some internal objects. But it's not a bug
in Devel::TrackObjects either.
Let's just say, they are not made to work close together.

But I've worked now around this overloading when debugging is enabled
(just released 0.5, see https://github.com/noxxi/p5-devel-trackobjects)
and so can you:

+ use overload;
...
- warn $tracked->[0];
+ warn overload::StrVal($tracked->[0]);

Regards,
Steffen