683572
From 9575301256f67116eccdbb99b38fc804ba3dcf53 Mon Sep 17 00:00:00 2001
683572
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
683572
Date: Mon, 18 Apr 2016 16:24:03 +0200
683572
Subject: [PATCH] Provide ExtUtils::MM methods as standalone
683572
 ExtUtils::MM::Utils
683572
MIME-Version: 1.0
683572
Content-Type: text/plain; charset=UTF-8
683572
Content-Transfer-Encoding: 8bit
683572
683572
If you cannot afford depending on ExtUtils::MakeMaker, you can
683572
depend on ExtUtils::MM::Utils instead.
683572
683572
<https://bugzilla.redhat.com/show_bug.cgi?id=1129443>
683572
683572
Signed-off-by: Petr Písař <ppisar@redhat.com>
683572
---
683572
 MANIFEST                                         |  1 +
683572
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM/Utils.pm | 68 ++++++++++++++++++++++++
683572
 2 files changed, 69 insertions(+)
683572
 create mode 100644 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM/Utils.pm
683572
683572
diff --git a/MANIFEST b/MANIFEST
683572
index 6af238c..d4f0c56 100644
683572
--- a/MANIFEST
683572
+++ b/MANIFEST
683572
@@ -784,6 +784,7 @@ cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS2.pm			MakeMaker methods for OS/2
683572
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS2.pm			MakeMaker methods for OS/2
683572
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_QNX.pm			MakeMaker methods for QNX
683572
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm			MakeMaker methods for Unix
683572
+cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM/Utils.pm		Independed MM methods
683572
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_UWIN.pm			MakeMaker methods for U/WIN
683572
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm			MakeMaker methods for VMS
683572
 cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VOS.pm			MakeMaker methods for VOS
683572
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM/Utils.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM/Utils.pm
683572
new file mode 100644
683572
index 0000000..6bbc0d8
683572
--- /dev/null
683572
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM/Utils.pm
683572
@@ -0,0 +1,68 @@
683572
+package ExtUtils::MM::Utils;
683572
+
683572
+require 5.006;
683572
+
683572
+use strict;
683572
+use vars qw($VERSION);
683572
+$VERSION = '7.11_06';
683572
+$VERSION = eval $VERSION;  ## no critic [BuiltinFunctions::ProhibitStringyEval]
683572
+
683572
+=head1 NAME
683572
+
683572
+ExtUtils::MM::Utils - ExtUtils::MM methods without dependency on ExtUtils::MakeMaker
683572
+
683572
+=head1 SYNOPSIS
683572
+
683572
+    require ExtUtils::MM::Utils;
683572
+    MM->maybe_command($file);
683572
+
683572
+=head1 DESCRIPTION
683572
+
683572
+This is a collection of L<ExtUtils::MM> subroutines that are used by many
683572
+other modules but that do not need full-featured L<ExtUtils::MakeMaker>. The
683572
+issue with L<ExtUtils::MakeMaker> is it pulls in Perl header files and that is
683572
+an overkill for small subroutines.
683572
+
683572
+An example is the L<IPC::Cmd> that caused installing GCC just because of
683572
+three-line I<maybe_command()> from L<ExtUtils::MM_Unix>.
683572
+
683572
+The intentions is to use L<ExtUtils::MM::Utils> instead of
683572
+L<ExtUtils::MakeMaker> for these trivial methods. You can still call them via
683572
+L<MM> class name.
683572
+
683572
+=head1 METHODS
683572
+
683572
+=over 4
683572
+
683572
+=item maybe_command
683572
+
683572
+Returns true, if the argument is likely to be a command.
683572
+
683572
+=cut
683572
+
683572
+if (!exists $INC{'ExtUtils/MM.pm'}) {
683572
+    *MM::maybe_command = *ExtUtils::MM::maybe_command = \&maybe_command;
683572
+}
683572
+
683572
+sub maybe_command {
683572
+    my($self,$file) = @_;
683572
+    return $file if -x $file && ! -d $file;
683572
+    return;
683572
+}
683572
+
683572
+1;
683572
+
683572
+=back
683572
+
683572
+=head1 BUGS
683572
+
683572
+These methods are copied from L<ExtUtils::MM_Unix>. Other operating systems
683572
+are not supported yet. The reason is this
683572
+L
683572
+distributions|https://bugzilla.redhat.com/show_bug.cgi?id=1129443>.
683572
+
683572
+=head1 SEE ALSO
683572
+
683572
+L<ExtUtils::MakeMaker>, L<ExtUtils::MM>
683572
+
683572
+=cut
683572
-- 
683572
2.5.5
683572