Skip Menu |

This queue is for tickets about the Data-Format-Pretty-Console CPAN distribution.

Report information
The Basics
Id: 65357
Status: resolved
Priority: 0/
Queue: Data-Format-Pretty-Console

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

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



Subject: Objects with overloaded stringification
Hi, If I put e.g. a DateTime object in a datastructure, it'll render as the DateTime object's hash ref. But DateTime has stringification overloaded, providing a human readable date. Do you think it would make sense to check whether objects have stringification overloaded, and display that as a scalar value instead of recursing into the object? Thanks, /J
On Tue Feb 01 19:19:26 2011, JOHANL wrote: Show quoted text
> Hi, > > If I put e.g. a DateTime object in a datastructure, it'll render as
the Show quoted text
> DateTime object's hash ref. But DateTime has stringification
overloaded, Show quoted text
> providing a human readable date. > > Do you think it would make sense to check whether objects have > stringification overloaded, and display that as a scalar value instead > of recursing into the object? > > > Thanks, > > /J
I think stringifying all objects by default is a better default behaviour, since the goal is not dumping data, but formatting. A new 0.06 version has just been released reflecting this. Thanks, -- sh