3 # Copyright (C) 2015 Ian Jackson
5 # Some bits stolen from the proper Dpkg::Changelog::Parse
6 # (from dpkg-dev 1.16.16):
8 # Copyright (C) 2005, 2007 Frank Lichtenheld <frank@lichtenheld.de>
9 # Copyright (C) 2009 Raphael Hertzog <hertzog@debian.org>
11 # This program is free software; you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License as published by
13 # the Free Software Foundation; either version 3 of the License, or
14 # (at your option) any later version.
16 # This program is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 # GNU General Public License for more details.
21 # You should have received a copy of the GNU General Public License
22 # along with this program. If not, see <http://www.gnu.org/licenses/>.
24 package Dpkg::Changelog::Parse;
29 our $VERSION = "1.00";
31 use Dpkg::Control::Changelog;
33 use base qw(Exporter);
34 our @EXPORT = qw(changelog_parse);
37 my (%options) = @_; # ignored
39 $options{'file'} //= 'debian/changelog';
41 open P, "dpkg-parsechangelog -l$options{'file'} |" or die $!;
43 my $fields = Dpkg::Control::Changelog->new();
44 $fields->parse(\*P, "output of stunt changelog parser");
46 close P or die "$! $?";