Dave already replied while I was driving home so some replies maybe short. :)
I really like the new is_X subs, although in the case of the
No. :) I agree with Dave.
i.e. If I have aliased EST to America/New_York, could it return
America/New_York rather than 1? Both are true so it should be
Crap, my mail client crash and ate part of my reply.
I was considering a function to do this. If you look... I hid a solution in the
docs. :)
my $my_alias = %{ DateTime::TimeZone::Alias-aliases }-{ EST };
I didn't want a function named alias and another one named aliases. But - how
-- Forwarded message --
Date: Tue, 17 Jun 2003 07:55:57 -0400
From: Ben Bennett [EMAIL PROTECTED]
To: Joshua Hoblitt [EMAIL PROTECTED]
Subject: Re: [announce] DateTime::TimeZone::Alias 0.01
On Mon, Jun 16, 2003 at 08:38:31PM -1000, Joshua Hoblitt wrote:
my $aliased_tz
-- Forwarded message --
Date: Tue, 17 Jun 2003 07:57:07 -0400
From: Ben Bennett [EMAIL PROTECTED]
To: Joshua Hoblitt [EMAIL PROTECTED]
Subject: Re: [announce] DateTime::TimeZone::Alias 0.01
On Mon, Jun 16, 2003 at 08:28:47PM -1000, Joshua Hoblitt wrote:
This is largely a design
That isn't quite the same thing. The code I had in mind would need to
do:
--
my $dta = DateTime::TimeZone::Alias;
if ( not $dta-is_defined( EST ) ) {
$dta-add( EST = US/Eastern );
}
elsif ( ( $dta-is_alias(US/Eastern) and
$dta-value( EST ) eq $dta-value( US/Eastern )
On Tue, Jun 17, 2003 at 09:52:46AM -1000, Joshua Hoblitt wrote:
Btw - US/Eastern is defined as an alias unless you removed it earler in the program.
Yeah, that is why I have to jump through more hoops in my example.
How would an add method that returns silently if an alias is already
my $dta = DateTime::TimeZone::Alias;
$dta-remove(EST);# Start with a clean slate
$dta-add(EST = US/Eastern); # Succeeds
$dta-add(EST = US/Eastern); # Succeeds
$dta-add(EST = America/New_York); # Succeeds
$dta-add(EST = America/Chicago); # Fails
--
I know
Perhaps I'm not following closely enough, but this thread is confusing
me.
On Tuesday, June 17, 2003, at 02:51 PM, Ben Bennett wrote:
On Tue, Jun 17, 2003 at 09:52:46AM -1000, Joshua Hoblitt wrote:
How would an add method that returns silently if an alias is already
defined tell if an alias
Ok. It is your module so this is your call.
I disagree, but that is ok. This should end the thread.
-ben
On Tue, Jun 17, 2003 at 01:26:43PM -1000, Joshua Hoblitt wrote:
my $dta = DateTime::TimeZone::Alias;
$dta-remove(EST);# Start with a clean slate
I think DateTime::TimeZone::Alias 0.03 is really looking good. The
docs are excellent (small patch to fix typos included below).
I really like the new is_X subs, although in the case of the
is_alias() would it make sense to return the target of the alias?
i.e. If I have aliased EST to
On Mon, 16 Jun 2003, Ben Bennett wrote:
I really like the new is_X subs, although in the case of the
is_alias() would it make sense to return the target of the alias?
No, any method that starts with is_ should return a boolean value (or only
be guaranteed to return such a thing). If you need
[EMAIL PROTECTED]
Subject: Re: [announce] DateTime::TimeZone::Alias 0.01
No prob :-)
And to deluge you with yet another message about this...
Is it a problem that it affects the TZ behavior across all modules? I
am not sure how you would get around that with the current TZ
interface (you would need
Is it a problem that it affects the TZ behavior across all modules? I
I should document this better.
am not sure how you would get around that with the current TZ
interface (you would need some way to get a TZ factory object that
you would use as a parameter to DT... but then anything
Released to CPAN.
Available immediately from:
http://kolea.ifa.hawaii.edu/~jhoblitt/pm/DateTime-TimeZone-Alias-0.01.tar.gz
Changes since 0.01pre1
Renamed del to remove on Dave's advice.
Cheers,
-J
--
14 matches
Mail list logo