Lintian::Lab::ManifestDiff -- Difference representation between two Manifests
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 }
Instances of this class provides access to the packages list used by the Lab as caches.
Returns a listref containing the keys of the elements that has been added.
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.
Returns a listref containing the keys of the elements that has been removed.
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.
Returns a listref containing the keys of the elements that has been changed.
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.
Returns the "new" manifest used to create this diff. Note the manifest is not copied and may have been changed since the diff has been created.
Returns the "orig" manifest used to create this diff. Note the manifest is not copied and may have been changed since the diff has been created.
Originally written by Niels Thykier <niels@thykier.net> for Lintian.
lintian(1)