NAME

Dpkg::Changelog::Debian - parse Debian changelogs

SYNOPSIS

    use Parse::DebianChangelog;

    my $chglog = Parse::DebianChangelog->init( { infile => 'debian/changelog',
                                                 HTML => { outfile => 'changelog.html' } );
    $chglog->html;

    # the following is semantically equivalent
    my $chglog = Parse::DebianChangelog->init();
    $chglog->parse( { infile => 'debian/changelog' } );
    $chglog->html( { outfile => 'changelog.html' } );

    my $changes = $chglog->dpkg_str( { since => '1.0-1' } );
    print $changes;

DESCRIPTION

Dpkg::Changelog::Debian parses Debian changelogs as described in the Debian policy (version 3.6.2.1 at the time of this writing). See section "SEE ALSO" for locations where to find this definition.

The parser tries to ignore most cruft like # or /* */ style comments, CVS comments, vim variables, emacs local variables and stuff from older changelogs with other formats at the end of the file. NOTE: most of these are ignored silently currently, there is no parser error issued for them. This should become configurable in the future.

METHODS

parse

Parses either the file named in configuration item infile, the content of the filehandle in configuration item inhandle, or the string saved in configuration item instring (the latter requires IO::String). You can set a filename to use for reporting errors with configuration item reportfile. Accepts a hash ref as optional argument which can contain configuration items.

Returns undef in case of error (e.g. "file not found", not parse errors) and the object if successful. If undef was returned, you can get the reason for the failure by calling the get_error method.

SEE ALSO

Dpkg::Changelog

Description of the Debian changelog format in the Debian policy: http://www.debian.org/doc/debian-policy/ch-source.html#s-dpkgchangelog.

AUTHOR

Frank Lichtenheld, <frank@lichtenheld.de>

COPYRIGHT AND LICENSE

Copyright (C) 2005 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 the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA