Skip to content

Instantly share code, notes, and snippets.

@gugod
Created February 8, 2009 02:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gugod/60143 to your computer and use it in GitHub Desktop.
Save gugod/60143 to your computer and use it in GitHub Desktop.
A little program that I used to get correct dependency list in Makefile.PL
#!/usr/bin/env perl
use strict;
use warnings;
use Module::ExtractUse;
my %used;
while (my $file = shift @ARGV) {
my $p = Module::ExtractUse->new;
$p->extract_use($file);
%used = (%used, %{$p->used});
}
delete @used{qw(strict warnings feature)};
print "requires\n";
for (sort keys %used) {
print " '$_' => 0,\n";
}
print ";\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment