* Adriano Ferreira: > On 8/21/07, Kjell-Magne Øierud <[EMAIL PROTECTED]> wrote: > > I think the most robust solution for me is to make all > > my systems use a module that redefines DateTime::_stringify(). > > I think there is an alternative which is more immediate and simpler > wrt many issues: create a sub (that acts like a DateTime factory), > wrap the DateTime constructors that matter to you and make sure the > formatter you want is correctly setted. Something like: >
Adriano, thank you for your advice. I do agree with you that this would be a good solution if I was myself in control over all the modules that uses DateTime. This is however not the case. I am, for example, using the InflateColumn::DateTime module from DBIx::Class. This module automatically creates DateTime objects from columns that stores temporal data. I would then need to change the code in InflateColumn::DateTime to use the new constructor. So I still believe that redefining the method is my best option. -- Kjell-Magne
