From 496a5b6f7163ca67742c0bee82c40b52b780349d Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Fri, 30 Nov 2007 23:01:08 +0100 Subject: [PATCH] Dpkg::Changelog: Various documentation updates --- scripts/Dpkg/Changelog.pm | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/scripts/Dpkg/Changelog.pm b/scripts/Dpkg/Changelog.pm index f8df3f35..a1cb87a2 100644 --- a/scripts/Dpkg/Changelog.pm +++ b/scripts/Dpkg/Changelog.pm @@ -1,7 +1,7 @@ # # Dpkg::Changelog # -# Copyright 2005 Frank Lichtenheld +# Copyright © 2005, 2007 Frank Lichtenheld # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -195,12 +195,9 @@ sub get_error { =head3 data C returns an array (if called in list context) or a reference -to an array of Parse::DebianChangelog::Entry objects which each +to an array of Dpkg::Changelog::Entry objects which each represent one entry of the changelog. -This is currently merely a placeholder to enable users to get to the -raw data, expect changes to this API in the near future. - This method supports the common output options described in section L<"COMMON OUTPUT OPTIONS">. @@ -352,11 +349,10 @@ content of the the entry/entries =back -C returns a stringified version of this hash which should look -exactly like the output of L. The fields are +C returns a stringified version of this hash. The fields are ordered like in the list above. -Both methods only support the common output options described in +Both methods support the common output options described in section L<"COMMON OUTPUT OPTIONS">. =head3 dpkg_str @@ -431,11 +427,9 @@ in the changelog. For the format of such a hash see the description of the L<"dpkg"> method (while ignoring the remarks about which values are taken from the first entry). -C returns a stringified version of this hash which looks -similar to the output of dpkg-parsechangelog but instead of one -stanza the output contains one stanza for each entry. +C returns a stringified version of this array. -Both methods only support the common output options described in +Both methods support the common output options described in section L<"COMMON OUTPUT OPTIONS">. =head3 rfc822_str @@ -488,8 +482,6 @@ all take a version number as value: Causes changelog information from all versions strictly later than B to be used. -(works exactly like the C<-v> option of dpkg-parsechangelog). - =item until Causes changelog information from all versions strictly @@ -515,9 +507,7 @@ don't take version numbers as values: =item all If set to a true value, all entries of the changelog are returned, -this overrides all other options. While the XML and HTML formats -default to all == true, this does of course not overwrite other -options unless it is set explicitly with the call. +this overrides all other options. =item count @@ -557,6 +547,8 @@ Any combination of one option of C and C and one of C and C returns the intersection of the two results with only one of the options specified. +=head1 UTILITY FUNCTIONS + =head3 find_closes Takes one string as argument and finds "Closes: #123456, #654321" statements @@ -569,7 +561,8 @@ sub find_closes { my $changes = shift; my @closes = (); - while ($changes && ($changes =~ /closes:\s*(?:bug)?\#?\s?\d+(?:,\s*(?:bug)?\#?\s?\d+)*/ig)) { + while ($changes && + ($changes =~ /closes:\s*(?:bug)?\#?\s?\d+(?:,\s*(?:bug)?\#?\s?\d+)*/ig)) { push(@closes, $& =~ /\#?\s?(\d+)/g); } @@ -736,7 +729,7 @@ Timestamp (Date expressed in seconds since the epoche) =item * ERROR (last parse error related to this entry in the format described -at Parse::DebianChangelog::get_parse_errors. +at Dpkg::Changelog::get_parse_errors. =back @@ -784,7 +777,7 @@ Frank Lichtenheld, Efrank@lichtenheld.deE =head1 COPYRIGHT AND LICENSE -Copyright (C) 2005 by Frank Lichtenheld +Copyright E 2005, 2007 by Frank Lichtenheld This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by -- 2.39.5