default => sub { '/' },
);
+has enumerate_packlists => ( is => 'ro', default => sub { 0 } );
+
sub gather {
my ($self) = @_;
log_debug { "Gathering Perl library information" };
my $packlist = $installed->packlist($module)->packlist_file;
Dlog_trace { "Packlist file for '$module' in '$libdir' is '$_'" } $packlist;
+
+ $modules{$module} = {};
- if (-f $packlist) {
- $modules{$module} = [ $installed->files($module, 'all') ];
- } else {
- $modules{$module} = undef;
+ if ($self->enumerate_packlists && -f $packlist) {
+ $modules{$module}->{packlist} = [ $installed->files($module, 'all') ];
}
}
return \%modules;
-
+}
+
+#sub _enumerate_metadata {
+# my ($self, $libdir, $module) = @_;
+#
# my $pipe = $self->_open_locate_pm_pipe($libdir);
# while (defined( my $line = <$pipe> )) {
# chomp $line;
# };
# }
# return \%module;
-}
+#}
#sub _open_locate_pm_pipe {
# my ($self, $libdir) = @_;
return handle_from_command sprintf
#lib/perl5 for Local::Lib? - lib/perl for others
q{locate --regex '^%s.*lib/perl5$'}, $root;
-# q{locate --regex '^%s.*lib/perl$'}, $root;
}
1;