Subject: | format_interval is missing and format_duration is inconsistent with rest of module |
I found two inconsistencies with DateTime::Format::Pg.
- format_interval does not exist, but it is documented
- format_duration does not work as a class method like all other public methods
They look more like oversights than bugs. I have included a patch
that fixes the issues.
--- Pg.pm.orig 2005-01-09 20:27:38.000000000 -0500
+++ Pg.pm 2005-01-09 20:29:20.000000000 -0500
@@ -815,7 +815,7 @@
=cut
sub format_duration {
- my($du,%param) = @_;
+ my($self,$du,%param) = @_;
croak 'DateTime::Duration object expected' unless UNIVERSAL::isa($du,'DateTime::Duration');
my %deltas = $du->deltas();
@@ -835,6 +835,8 @@
return $output;
}
+*format_interval = \&format_duration;
+
=back
=cut