Debian::AptContents(3pm) | User Contributed Perl Documentation | Debian::AptContents(3pm) |
Debian::AptContents - parse/search through apt-file's Contents files
my $c = Debian::AptContents->new( { homedir => '~/.dh-make-perl' } ); my @pkgs = $c->find_file_packages('/usr/bin/foo'); my $dep = $c->find_perl_module_package('Foo::Bar');
This needs to really work not only for Perl modules.
A module specific to Perl modules is needed by dh-make-perl, but it can subclass Debian::AptContents, which needs to become more generic.
Storable is used to stream the data. Along with the information from Contents files, a time stamp is stored.
Contents files store the package section together with package name. That is stripped.
Returns an empty list of the file is not found in any package.
If the package is also available in a separate package, an alternative dependency is returned.
In case the version of the currently running Perl interpreter is lower than the version in which the wanted module is available in core, the separate package is preferred. Otherwise the perl dependency is the first alternative.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.
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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
2019-02-28 | perl v5.28.1 |