#
-BEGIN {
- require 5.10.0;
- unless (-f 'configure') {
- print "Error: $0 must be run from the main source directory!\n";
- exit 1;
- }
-}
-
-use feature ':5.10';
+use v5.10.0;
use strict;
use warnings FATAL => qw(all);
my ($data, $error) = from_toml $contents;
print_error "unable to parse $config: $!" if $error;
-while (my ($name, $info) = each $data) {
- print_format "Updating <|GREEN $name|> ...\n";
+while (my ($name, $info) = each %{$data}) {
+ say console_format "Updating <|GREEN $name|> ...";
my $unpackdir = File::Temp->newdir;
my $vendordir = catdir $RealDir, $name;
open($fh, '>', $readme) or print_error "unable to write $readme: $!";
print $fh $contents =~ s/\n\#\#.*//rs;
-for my $name (sort keys $data) {
+for my $name (sort keys %{$data}) {
my $info = $data->{$name};
printf $fh "\n## %s\n\n", $name;
printf $fh "**Author** — [%s](mailto:%s)\n\n", $info->{author}, $info->{email} if $info->{email};
my $website = $info->{website} // $info->{git};
printf $fh "**Website** — [%s](%s)\n", $website, $website;
}
-close $fh;
\ No newline at end of file
+close $fh;