This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Create new perldelta
[perl5.git] / dist / Module-CoreList / identify-dependencies
CommitLineData
3a02dfe7
RGS
1#!/usr/local/perl5.6.1/bin/perl -w
2use strict;
3use warnings;
4use Module::CoreList;
5
6use vars qw/%modules/;
7
8my @files = @ARGV;
9unless (@files) {
10 print "$0: using test scripts\n";
11 @files = grep { -e $_ } 'test.pl', glob 't/*.t';
12}
13
14print "$0: checking ", join(', ', @files), "\n";
15
16my @used;
17for (@files) {
18 open my $fh, "$^X -Mblib -MModule::CoreList=dumpinc $_|"
19 or die "couldn't fork $!";
20 while (<$fh>) { last if /^---INC---/ }
21 push @used, map { chomp; s{/}{::}g; s{\.pm$}{}; $_ } <$fh>;
22}
23
24*modules = \%Module::CoreList::version;
25my %uniq = map { $_ => 0 } grep { !exists $modules{$]}{$_} } @used;
26
27use Data::Dumper;
28print Dumper \%uniq;