Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

30 lines (20 sloc) 0.617 kb
#!/usr/bin/perl -w
use Config;
use Module::Build;
my $build = Module::Build->current;
my %config = (%Config, $build->notes);
my $input_file = shift;
my $output_file = shift;
open my $input_fh, $input_file or die "Can't open $input_file: $!";
open my $output_fh, ">$output_file" or die "Can't open $output_file: $!";
print $output_fh <<"END";
/*
* !!! DO NOT EDIT THIS FILE!!!
* This file was generated from $input_file.
* Edit that and rerun make to regenerate.
*/
END
while(<$input_fh>) {
my $matched = s{%%(.*)%%}{defined $config{$1} ? $config{$1} : ''}eg;
print $output_fh $_;
}
Jump to Line
Something went wrong with that request. Please try again.