This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Doc update for changes in 5.15.0 + tweaks
[perl5.git]
/
Porting
/
makemeta
diff --git
a/Porting/makemeta
b/Porting/makemeta
index
a66b052
..
af39ecc
100644
(file)
--- a/
Porting/makemeta
+++ b/
Porting/makemeta
@@
-13,12
+13,11
@@
use File::Basename qw( dirname );
BEGIN {
# Get function prototypes
BEGIN {
# Get function prototypes
- require 'regen_lib.pl';
+ require 'regen
/regen
_lib.pl';
}
my $file = "META.yml";
}
my $file = "META.yml";
-my $new_file = "META.yml-new";
use Maintainers qw(%Modules get_module_files get_module_pat);
use Maintainers qw(%Modules get_module_files get_module_pat);
@@
-31,28
+30,32
@@
my @dirs = ('cpan', 'win32', grep { -d $_ && $_ !~ /^cpan/ } map { get_module_
my %dirs;
@dirs{@dirs} = ();
my %dirs;
@dirs{@dirs} = ();
-
my $files = join '', map { " - $_\n
" }
+
@files = map { " - $_
" }
grep {
my $d = $_;
grep {
my $d = $_;
+ my $previous_d = '';
while(($d = dirname($d)) ne "."){
while(($d = dirname($d)) ne "."){
+ last if $d eq $previous_d; # safety valve
last if exists $dirs{$d};
last if exists $dirs{$d};
+ $previous_d = $d;
}
# if $d is "." it means we tried every parent dir of the file and none
# of them were in the private list
}
# if $d is "." it means we tried every parent dir of the file and none
# of them were in the private list
- $d eq "."
;
+ $d eq "."
|| $d eq $previous_d;
}
sort { lc $a cmp lc $b } @files;
}
sort { lc $a cmp lc $b } @files;
-
my $dirs = join '', map { " - $_\n
" } sort { lc $a cmp lc $b } @dirs;
+
@dirs = map { " - $_
" } sort { lc $a cmp lc $b } @dirs;
-my $fh =
safer_open($new_
file);
+my $fh =
open_new($
file);
+local $" = "\n";
print $fh <<"EOI";
name: perl
version: $]
print $fh <<"EOI";
name: perl
version: $]
-abstract: The Perl language interpreter
+abstract: The Perl
5
language interpreter
author: perl5-porters\@perl.org
license: perl
resources:
author: perl5-porters\@perl.org
license: perl
resources:
@@
-64,11
+67,9
@@
distribution_type: core
generated_by: $0
no_index:
directory:
generated_by: $0
no_index:
directory:
-
$
dirs
+
@
dirs
file:
file:
-
$
files
+
@
files
EOI
EOI
-safer_close($fh);
-rename_if_different($new_file, $file);
-
+close_and_rename($fh);