Alexey Mahotkin wrote:
> I've installed DateTime::TimeZone 0.2503 from CPAN under the Perl
> 5.8.1 and noticed the following glitches, which are fixed in the patch
> below and described in Changes.
They don't appear to be glitches but suggestions :)
> DateTime-TimeZone-0.2503/Build.PL
> + 'DateTime' => 0,
If you do that, then you can't install it :)
DateTime requires that DateTime::TimeZone be installed before it will
install. So if you make DateTime::TimeZone require that DateTime be
installed, then neither can install.
> DateTime-TimeZone-0.2503/lib/DateTime/TimeZone.pm
> + die "Invalid time zone name: $p{name}\n$@" if $@;
This is a good suggestion, but returning $@ doesn't happen in many
(any?)
(IIRC) other places in DateTime. Personally I'd like to get back
confess()
rather than die .. then you know where it went wrong.
DateTime-TimeZone-0.2503/lib/DateTime/TimeZone.pm
SYNOPSIS
> + use DateTime;
> + my $datetime = DateTime->now();
> + my $offset = $tz->offset_for_datetime($datetime);
Rather than this, maybe we need to add a note to all modules to signify
that
$datetime and $dt refer to DateTime.pm objects.
> +C<DateTime::TimeZone> objects provide the following methods
($datetime
> +is assumed to be an instance of DateTime class):
See above.
Thanks for your suggestions Alexey!
Cheers!
Rick