Re: RFC: Adding custom locales to DateTime::Locale part deux

2003-06-13 Thread Dave Rolsky
On Thu, 12 Jun 2003, Richard Evans wrote: > a) If you're using the DateTime::Locale namespace: > > DateTime::Locale->register_locale(de_DE_RIDAS1 => > 'deu_DE_RIDAS1', > 'ger_DE_RIDAS1', >

RFC: Adding custom locales to DateTime::Locale part deux

2003-06-12 Thread Richard Evans
Right, what if the requirements for adding locales are as follows: If you need to add a custom locale that cannot inherit from an existing one: 1) Inherit from DateTime::Locale::Base - you'll need to implement the fo

Re: RFC: Adding custom locales to DateTime::Locale

2003-06-11 Thread Joshua Hoblitt
> What exactly is prevent you from just passing an object as the language > parameter to the DateTime constructor? DT::Language can't be subclassed from outside the DT::Language tree because of the way the constructor works. My patch makes it so that when ->new is called without any arguments a

Re: RFC: Adding custom locales to DateTime::Locale

2003-06-11 Thread Richard Evans
Rick Measham wrote: >> So this is how it would work - you write custom locales, shove them in >> one of the @INC paths (preferably different to the DT::Locale install >> path) and add the LocalInstall module which is used to register your >> locales. > > I'd really like to not depend on Locale.pm

Re: RFC: Adding custom locales to DateTime::Locale

2003-06-10 Thread Joshua Hoblitt
> > Can we just have an API that any module could potentially use? > > I think we need this, but we may also need a way to hook locales into > DateTime::Locale. And I think the next question is: "Should this be at run-time or should there be a persistent registry?" -J --

Re: RFC: Adding custom locales to DateTime::Locale

2003-06-10 Thread Joshua Hoblitt
> Can we just have an API that any module could potentially use? Now thats just entirely too rational. Thank you for articulating my frustration. > $locale = new My::Locale; > $dt = DateTime->new(%date, locale => $locale); I always assumed that we'd be getting this as it currently works for DT:

Re: RFC: Adding custom locales to DateTime::Locale

2003-06-10 Thread Dave Rolsky
On Wed, 11 Jun 2003, Rick Measham wrote: > I'd really like to not depend on Locale.pm other than as a loader for > normal, included Locale methods. > > Can we just have an API that any module could potentially use? I think we need this, but we may also need a way to hook locales into DateTime::Lo

Re: RFC: Adding custom locales to DateTime::Locale

2003-06-10 Thread Rick Measham
> So this is how it would work - you write custom locales, shove them in one > of the @INC paths (preferably different to the DT::Locale install path) and > add the LocalInstall module which is used to register your locales. I'd really like to not depend on Locale.pm other than as a loader for nor

Re: RFC: Adding custom locales to DateTime::Locale

2003-06-10 Thread Joshua Hoblitt
> So this is how it would work - you write custom locales, shove them in one > of the @INC paths (preferably different to the DT::Locale install path) and > add the LocalInstall module which is used to register your locales. It would be nice if modules could reside in arbitrary namespaces. For ex

RFC: Adding custom locales to DateTime::Locale

2003-06-10 Thread Richard Evans
Hi everyone It's clear that some folks are going to need custom locales whatever the coverage of the core DT::Locale modules. It's also pretty clear that DT::Locale isn't very friendly when you want to such locales: Currently you have to add an entry into the DateTime::Locale::_locale method arr