use Lintian::Lab::Manifest; my $olist = Lintian::Lab::Manifest->new ('binary'); my $nlist = Lintian::Lab::Manifest->new ('binary'); $olist->read_list ('old/binary-packages'); $nlist->read_list ('new/binary-packages'); my $diff = $olist->diff($nlist); foreach my $added (@{ $diff->added }) { my $entry = $nlist->get (@$added); # do something } foreach my $removed (@{ $diff->removed }) { my $entry = $olist->get (@$removed); # do something } foreach my $changed (@{ $diff->changed }) { my $oentry = $olist->get (@$changed); my $nentry = $nlist->get (@$changed); # use/diff $oentry and $nentry as needed }
Each element is a listref of keys; this list (when dereferenced) can be used with the manifest's get method to look up the item.
Each element is a listref of keys; this list (when dereferenced) can be used with the manifest's get method to look up the item.
Each element is a listref of keys; this list (when dereferenced) can be used with the manifest's get method to look up the item.
Originally written by Niels Thykier <niels@thykier.net> for Lintian.