diff options
Diffstat (limited to 'scripts/Dpkg')
-rw-r--r-- | scripts/Dpkg/Changelog/Entry.pm | 16 | ||||
-rw-r--r-- | scripts/Dpkg/Changelog/Entry/Debian.pm | 15 |
2 files changed, 28 insertions, 3 deletions
diff --git a/scripts/Dpkg/Changelog/Entry.pm b/scripts/Dpkg/Changelog/Entry.pm index 2b611bfda..c9deb044d 100644 --- a/scripts/Dpkg/Changelog/Entry.pm +++ b/scripts/Dpkg/Changelog/Entry.pm @@ -18,7 +18,7 @@ package Dpkg::Changelog::Entry; use strict; use warnings; -our $VERSION = '1.00'; +our $VERSION = '1.01'; use Carp; @@ -281,6 +281,16 @@ sub get_timestamp { return; } +=item $time = $entry->get_timepiece() + +Return the timestamp of the changelog entry as a Time::Piece object. + +=cut + +sub get_timepiece { + return; +} + =item $str = $entry->get_dpkg_changes() Returns a string that is suitable for usage in a C<Changes> field @@ -299,6 +309,10 @@ sub get_dpkg_changes { =head1 CHANGES +=head2 Version 1.01 (dpkg 1.18.8) + +New method: $entry->get_timepiece(). + =head2 Version 1.00 (dpkg 1.15.6) Mark the module as public. diff --git a/scripts/Dpkg/Changelog/Entry/Debian.pm b/scripts/Dpkg/Changelog/Entry/Debian.pm index 4e9d510d4..14f2d07b0 100644 --- a/scripts/Dpkg/Changelog/Entry/Debian.pm +++ b/scripts/Dpkg/Changelog/Entry/Debian.pm @@ -19,7 +19,7 @@ package Dpkg::Changelog::Entry::Debian; use strict; use warnings; -our $VERSION = '1.02'; +our $VERSION = '1.03'; our @EXPORT_OK = qw( $regex_header $regex_trailer @@ -220,7 +220,8 @@ sub parse_trailer { # Ignore the week day ('%a, '), as we have validated it above. local $ENV{LC_ALL} = 'C'; eval { - Time::Piece->strptime($7, '%d %b %Y %T %z'); + my $tp = Time::Piece->strptime($7, '%d %b %Y %T %z'); + $self->{trailer_timepiece} = $tp; } or do { # Validate the month. Date::Parse used to accept both abbreviated # and full months, but Time::Piece strptime() implementation only @@ -345,6 +346,12 @@ sub get_timestamp { return $self->{trailer_timestamp_date}; } +sub get_timepiece { + my $self = shift; + + return $self->{trailer_timepiece}; +} + =back =head1 UTILITY FUNCTIONS @@ -403,6 +410,10 @@ sub find_closes { =head1 CHANGES +=head2 Version 1.03 (dpkg 1.18.8) + +New methods: $entry->get_timepiece(). + =head2 Version 1.02 (dpkg 1.18.5) New methods: $entry->parse_header(), $entry->parse_trailer(). |