Skip to content

Instantly share code, notes, and snippets.

@bessarabov
Created October 17, 2013 06:38
Show Gist options
  • Save bessarabov/7020058 to your computer and use it in GitHub Desktop.
Save bessarabov/7020058 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
=encoding UTF-8
=cut
=head1 DESCRIPTION
=cut
# common modules
use strict;
use warnings FATAL => 'all';
use feature 'say';
use utf8;
use open qw(:std :utf8);
use Data::Dumper;
use Carp;
use DhMakePerl::Config;
use Debian::AptContents;
# global vars
# subs
# main
sub main {
my $cfg = DhMakePerl::Config->new;
$cfg->parse_command_line_options;
$cfg->parse_config_file;
my $params = {
homedir => $cfg->home_dir,
dist => $cfg->dist,
sources => $cfg->sources_list,
verbose => $cfg->verbose,
contents_dir => $cfg->apt_contents_dir,
};
say Dumper $params;
my $apt_c = Debian::AptContents->new( $params );
my @data = $apt_c->cache;
say Dumper \@data;
say '#END';
}
main();
__END__
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment