ExtUtil...mand::MM(3)

πŸ“¦ version 7.70, in opensuse-leap 16.0

πŸŽ€ NAME πŸŽ€

okay bestie, this is ExtUtils::Command::MM β€” Commands for the MM's to use in Makefiles. it's the ExtUtils::Command::MM page (section 3) from the User Contributed Perl Documentation, and it's literally a little grab-bag of commands the MM's use in Makefiles. πŸ’…


✨ SYNOPSIS ✨

here's the whole vibe:

perl "-MExtUtils::Command::MM" -e "function" "--" arguments...

πŸ’– DESCRIPTION πŸ’–

FOR INTERNAL USE ONLY! the interface is not stable, so don't build your whole personality on it, bestie. 😭

ExtUtils::Command::MM encapsulates code which would otherwise have to be done with large "one" liners. iconic, honestly.

btw any $(FOO) used in the examples are make variables, not Perl β€” do not come for me, that's just how it is. 🫢

🌸 test_harness 🌸

test_harness($verbose, @test_libs);

okay so this runs the tests on @ARGV via Test::Harness, passing through the $verbose flag. any @test_libs get unshifted onto the test's @INC. and yes, @test_libs are run in alphabetical order. periodt. πŸ¦‹

πŸŽ€ pod2man πŸŽ€

pod2man( '--option=value',
         $podfile1 => $manpage1,
         $podfile2 => $manpage2,
         ...
       );

# or args on @ARGV

pod2man() is a function performing most of the duties of the pod2man program. its arguments are exactly the same as pod2man as of 5.8.0, with the addition of:

--perm_rw   octal permission to set the resulting manpage to

and the removal of:

--verbose/-v
--help/-h

if no arguments are given to pod2man it will read from @ARGV. and if Pod::Man is unavailable, this function will warn and return undef. no cap. πŸ’€

🧚 warn_if_old_packlist 🧚

perl "-MExtUtils::Command::MM" -e warn_if_old_packlist <somefile>

displays a warning that an old packlist file was found. reads the filename from @ARGV. lowkey useful. πŸ™ˆ

πŸ‘‘ perllocal_install πŸ‘‘

perl "-MExtUtils::Command::MM" -e perllocal_install
    <type> <module name> <key> <value> ...

# VMS only, key|value pairs come on STDIN
perl "-MExtUtils::Command::MM" -e perllocal_install
    <type> <module name> < <key>|<value> ...

prints a fragment of POD suitable for appending to perllocal.pod. arguments are read from @ARGV. πŸ“

  • type is the type of what you're installing. usually Module.
  • module name is simply the name of your module. (Foo::Bar)
  • key/value pairs are extra information about the module. fields include:
    • installed into β€” which directory your module was out into
    • LINKTYPE β€” dynamic or static linking
    • VERSION β€” module version number
    • EXE_FILES β€” any executables installed in a space separated list

πŸ’… uninstall πŸ’…

perl "-MExtUtils::Command::MM" -e uninstall <packlist>

a wrapper around ExtUtils::Install::uninstall(). it warns that uninstallation is deprecated and doesn't actually perform the uninstallation. so yeah, it's giving "notice me but don't do anything." 😭

🌈 test_s 🌈

perl "-MExtUtils::Command::MM" -e test_s <file>

tests if a file exists and is not empty (size > 0). exits with 0 if it does, 1 if it does not. literal vibe check for files. βœ…

⭐ cp_nonempty ⭐

perl "-MExtUtils::Command::MM" -e cp_nonempty <srcfile> <dstfile> <perm>

tests if the source file exists and is not empty (size > 0). if it is not empty it copies it to the given destination with the given permissions. slay. πŸ’–


and that's the ExtUtil...mand::MM(3) page, bestie β€” from perl v5.42.0, dated 2023-04-04. go make those Makefiles behave. 🫢✨

πŸ“¦ where this page comes from