Created
March 28, 2010 20:29
-
-
Save madsen/347019 to your computer and use it in GitHub Desktop.
Convert dist.ini files from Dist::Zilla 1.x to 2.x
This file contains hidden or 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
#! /usr/bin/perl | |
#--------------------------------------------------------------------- | |
# dzil2cvt.pl | |
# Copyright 2010 Christopher J. Madsen | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the same terms as Perl itself. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the | |
# GNU General Public License or the Artistic License for more details. | |
# | |
# Convert dist.ini files from Dist::Zilla 1.x to 2.x | |
#--------------------------------------------------------------------- | |
use strict; | |
use warnings; | |
use IO::All; | |
die "Usage: $0 dist.ini ...\n" unless @ARGV; | |
foreach my $fn (@ARGV) { | |
my $lines = io($fn); | |
for (@$lines) { | |
s/^\[AllFiles\]/[GatherDir]/; | |
print "$fn: InstallDirs is now ExecDir or ShareDir\n" | |
if /^\[InstallDirs\]/; | |
s/^\[PodTests\]/[PodSyntaxTests]\n[PodCoverageTests]/; | |
s!^\[BuildReq\]![Prereq / BuildRequires]!; | |
s!^\[ConfigReq\]![Prereq / ConfigureRequires]!; | |
s!^\[MetaRecommends\]![Prereq / RuntimeRecommends]!; | |
} # end for | |
} # end foreach $fn in @ARGV |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment