Garrett, Philip (MAN-Corporate) wrote:
I'm just trying to make the DT::LI object act like a DT.  Isn't that the idea?

The idea is to allow quick creation of DT objects .. mainly for the purpose of creating thousands of DT object that lazily inflate to full-blown DateTime objects. It would be good to transparently inflate everything, but I'm not going to do that at the expense of adding overloads.

To help with this, the next release will have inflate() rather than __inflate() in order to allow deliberate inflation without feeling like you're messing with internals.

I think it will also allow you to add a Class name to inflate() so that you can use your subclassing ..

print ref $dtLI;
# DateTime::LazyInit;

$dtLI->inflate('yourClass');

print ref $dtLI;
# yourClass

Cheers!
Rick Measham

P.S. if you want to run benchmarking on the overloading, and it shows that it doesn't increase load or creation time(span) of DT:LI objects I'm willing to reconsider, but I'm a bit loathe :)


Reply via email to