In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/4a59181454f23dbf43f396b924ff7434b63c9d98?hp=d3148f758506efd28325dfd8e1b698385133f0cd>

- Log -----------------------------------------------------------------
commit 4a59181454f23dbf43f396b924ff7434b63c9d98
Author: Aaron Crane <a...@cpan.org>
Date:   Wed Oct 12 10:34:13 2016 +0100

    RT#129229: move sort_manifest() into its own library
    
    This means that the MANIFEST.srt target in the Makefile no longer needs
    to load a library that depends on Cwd (and other potentially-dynamic
    modules). That in turn fixes a missing-dependency bug in the Makefile.
-----------------------------------------------------------------------

Summary of changes:
 MANIFEST                |  1 +
 Porting/README.pod      |  4 ++++
 Porting/manifest_lib.pl | 53 +++++++++++++++++++++++++++++++++++++++++++++++++
 Porting/manisort        |  2 +-
 Porting/pod_lib.pl      | 29 ---------------------------
 Porting/pod_rules.pl    |  1 +
 6 files changed, 60 insertions(+), 30 deletions(-)
 create mode 100644 Porting/manifest_lib.pl

diff --git a/MANIFEST b/MANIFEST
index 7c9b752..d2dfa4c 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -5004,6 +5004,7 @@ Porting/make_snapshot.pl  Make a tgz snapshot of our tree 
with a .patch file in i
 Porting/makemeta               Create the top-level META.yml
 Porting/makerel                        Release making utility
 Porting/manicheck              Check against MANIFEST
+Porting/manifest_lib.pl                Library for checking and sorting the 
MANIFEST
 Porting/manisort               Sort the MANIFEST
 Porting/new-perldelta.pl       Generate a new perldelta
 Porting/newtests-perldelta.pl  Generate Perldelta stub for newly added tests
diff --git a/Porting/README.pod b/Porting/README.pod
index af78bbf..bb047eb 100644
--- a/Porting/README.pod
+++ b/Porting/README.pod
@@ -250,6 +250,10 @@ web page to use to generate the snapshot files.
 This script outputs a list of files in F<MANIFEST> which don't exist and a
 list of files that exist and aren't in F<MANIFEST>.
 
+=head2 F<manifest_lib.pl>
+
+This library provides functions used in checking and sorting the F<MANIFEST>.
+
 =head2 F<manisort>
 
 This script sorts the files in F<MANIFEST>.
diff --git a/Porting/manifest_lib.pl b/Porting/manifest_lib.pl
new file mode 100644
index 0000000..0b63046
--- /dev/null
+++ b/Porting/manifest_lib.pl
@@ -0,0 +1,53 @@
+#!/usr/bin/perl
+
+use strict;
+
+=head1 NAME
+
+Porting/manifest_lib.pl - functions for managing manifests
+
+=head1 SYNOPSIS
+
+    require './Porting/manifest_lib.pl';
+
+=head1 DESCRIPTION
+
+=head2 C<sort_manifest>
+
+Treats its arguments as (chomped) lines from a MANIFEST file, and returns that
+listed sorted appropriately.
+
+=cut
+
+# Try to get a sane sort. case insensitive, more or less
+# sorted such that path components are compared independently,
+# and so that lib/Foo/Bar sorts before lib/Foo-Alpha/Baz
+# and so that lib/Foo/Bar.pm sorts before lib/Foo/Bar/Alpha.pm
+# and so that configure and Configure sort together.
+sub sort_manifest {
+    return
+    # case insensitive sorting of directory components independently.
+    map { $_->[0] } # extract the full line
+    sort {
+        $a->[1] cmp $b->[1] || # sort in order of munged filename
+        $a->[0] cmp $b->[0]    # then by the exact text in full line
+    }
+    map {
+        # split out the filename and the description
+        my ($f) = split /\s+/, $_, 2;
+        # lc the filename so Configure and configure sort together in the list
+        my $m= lc $f; # $m for munged
+        # replace slashes by nulls, this makes short directory names sort 
before
+        # longer ones, such as "foo/" sorting before "foo-bar/"
+        $m =~ s!/!\0!g;
+        # replace the extension (only one) by null null extension.
+        # this puts any foo/blah.ext before any files in foo/blah/
+        $m =~ s!(\.[^.]+\z)!\0\0$1!;
+        # return the original string, and the munged filename
+        [ $_, $m ];
+    } @_;
+}
+
+1;
+
+# ex: set ts=8 sts=4 sw=4 et:
diff --git a/Porting/manisort b/Porting/manisort
index 72cbb9c..3d698e2 100644
--- a/Porting/manisort
+++ b/Porting/manisort
@@ -14,7 +14,7 @@ $| = 1;
 
 # Get command line options
 use Getopt::Long;
-require "Porting/pod_lib.pl";
+require "Porting/manifest_lib.pl";
 my $outfile;
 my $check_only = 0;
 my $quiet = 0;
diff --git a/Porting/pod_lib.pl b/Porting/pod_lib.pl
index 4ad204c..6eaacde 100644
--- a/Porting/pod_lib.pl
+++ b/Porting/pod_lib.pl
@@ -663,35 +663,6 @@ sub get_pod_metadata {
     return \%state;
 }
 
-# Try to get a sane sort. case insensitive, more or less
-# sorted such that path components are compared independently,
-# and so that lib/Foo/Bar sorts before lib/Foo-Alpha/Baz
-# and so that lib/Foo/Bar.pm sorts before lib/Foo/Bar/Alpha.pm
-# and so that configure and Configure sort together.
-sub sort_manifest {
-    return
-    # case insensitive sorting of directory components independently.
-    map { $_->[0] } # extract the full line
-    sort {
-        $a->[1] cmp $b->[1] || # sort in order of munged filename
-        $a->[0] cmp $b->[0]    # then by the exact text in full line
-    }
-    map {
-        # split out the filename and the description
-        my ($f) = split /\s+/, $_, 2;
-        # lc the filename so Configure and configure sort together in the list
-        my $m= lc $f; # $m for munged
-        # replace slashes by nulls, this makes short directory names sort 
before
-        # longer ones, such as "foo/" sorting before "foo-bar/"
-        $m =~ s!/!\0!g;
-        # replace the extension (only one) by null null extension.
-        # this puts any foo/blah.ext before any files in foo/blah/
-        $m =~ s!(\.[^.]+\z)!\0\0$1!;
-        # return the original string, and the munged filename
-        [ $_, $m ];
-    } @_;
-}
-
 1;
 
 # ex: set ts=8 sts=4 sw=4 et:
diff --git a/Porting/pod_rules.pl b/Porting/pod_rules.pl
index af5550e..37cbb9c 100644
--- a/Porting/pod_rules.pl
+++ b/Porting/pod_rules.pl
@@ -33,6 +33,7 @@ if (ord("A") == 193) {
            );
 
 require 'Porting/pod_lib.pl';
+require 'Porting/manifest_lib.pl';
 sub my_die;
 
 # process command-line switches

--
Perl5 Master Repository

Reply via email to