HEX
Server: Apache
System: Linux iad1-shared-b8-33 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User: samfetchero1 (10301780)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //bin/aptitude-changelog-parser
#!/usr/bin/perl

use strict;
use warnings;

eval {
    require Dpkg::Changelog::Parse;
    Dpkg::Changelog::Parse->import();
    1;
} or do {
    warn "warning: Dpkg::Changelog::Parse not present, install libdpkg-perl\n";
    exit 0;
};

# Usage: aptitude-changelog-parser [<filename> [<from-version>]]

my %opts;
if (scalar @ARGV >= 1) {
    $opts{file} = shift @ARGV;
}
if (scalar @ARGV == 1) {
    $opts{from} = $ARGV[0];
} else {
    $opts{all} = undef;
}

print join "\n", changelog_parse(format => 'rfc822', %opts);