Created
May 29, 2019 13:59
-
-
Save cxw42/b4a84ef43f7d2b0f51185e196ea11263 to your computer and use it in GitHub Desktop.
Creating a cpanfile from dependency information in Makefile.PL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!perl | |
# Make a cpanfile from the dependencies in Makefile.PL. | |
# Modified from https://github.com/miyagawa/cpanfile/blob/master/README.md | |
# by miyagawa | |
use CPAN::Meta; | |
use Module::CPANfile; | |
die "Could not run Makefile.PL" | |
unless system($^X, 'Makefile.PL') == 0; | |
my $meta = CPAN::Meta->load_file("MYMETA.json"); | |
my $file = Module::CPANfile->from_prereqs($meta->prereqs); | |
$file->save("cpanfile"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment