Alien::Build::MM(3)

Alien::Build::MM πŸ’–

okay bestie, so this is the User Contributed Perl Documentation page for Alien::Build::MM, and it's literally the glue that makes Alien::Build work with ExtUtils::MakeMaker. and this version? it's version 2.88. periodt. πŸ’…


✨ SYNOPSIS ✨

so first, in your Makefile.PL:

use ExtUtils::MakeMaker;
use Alien::Build::MM;

my $abmm = Alien::Build::MM->new;

WriteMakefile($abmm->mm_args(
  ABSTRACT     => 'Discover or download and install libfoo',
  DISTNAME     => 'Alien-Libfoo',
  NAME         => 'Alien::Libfoo',
  VERSION_FROM => 'lib/Alien/Libfoo.pm',
  ...
));

sub MY::postamble {
  $abmm->mm_postamble(@_);
}

sub MY::install {
  $abmm->mm_install(@_);
}

then in your lib/Alien/Libfoo.pm:

package Alien::Libfoo;
use parent qw( Alien::Base );
1;

and then in your alienfile β€” which has to be named alienfile and should live in the root of your dist, no cap 🫢:

use alienfile;

plugin 'PkgConfig' => 'libfoo';

share {
  start_url 'http://libfoo.org';
  ...
};

🌸 DESCRIPTION 🌸

this class lets you use Alien::Build and Alien::Base with ExtUtils::MakeMaker. it loads the alienfile recipe sitting in the root of your Alien dist, updates the prereqs you passed into WriteMakefile if your alienfile (or its plugins) said anything about them, and adds a postamble to the Makefile that'll download/build/test the alienized package as appropriate. iconic behaviour honestly. πŸ’–

the alienfile must be named alienfile. not optional, bestie.

if you're authoring your Alien dist with Dist::Zilla, you should lowkey consider the Dist::Zilla::Plugin::AlienBuild plugin.

and ok, I personally don't recommend it, but if you wanna use Module::Build instead, you can use Alien::Build::MB. you do you πŸ¦‹


πŸŽ€ CONSTRUCTOR πŸŽ€

new

my $abmm = Alien::Build::MM->new;

creates a new instance of Alien::Build::MM. that's it, that's the vibe ✨


πŸ’œ PROPERTIES πŸ’œ

build

my $build = $abmm->build;

the Alien::Build instance. yours to poke at.

alienfile_meta

my $bool = $abmm->alienfile_meta

set this to a false value to turn off the x_alienfile meta.

clean_install

my $bool = $abmm->clean_install;

set this to a true value to clean the share directory before installing. but heads up bestie β€” if you use this, you gotta make sure you install the install handler in your Makefile.PL:

$abmm = Alien::Build::MM->new(
  clean_install => 1,
);

...

sub MY::install {
  $abmm->mm_install(@_);
}

no handler, no clean install. them's the rules 🫢


πŸ”₯ METHODS πŸ”₯

mm_args

my %args = $abmm->mm_args(%args);

adjusts the arguments you passed into WriteMakefile however Alien::Build needs them adjusted.

mm_postamble

my $postamble $abmm->mm_postamble;
my $postamble $abmm->mm_postamble($mm);

returns the postamble for the Makefile that Alien::Build needs. this adds the following make targets, which are normally called when you run make all β€” but you can totally run them individually if you need to debug something πŸ‘‘

  • alien_prefix β€” determines the final install prefix (%{.install.prefix}).
  • alien_version β€” determines the perl_module_version (%{.runtime.perl_module_version}).
  • alien_download β€” downloads the source from the internet. does nothing for a system install.
  • alien_build β€” builds from source (if a share install). also gathers configuration (for either a system or a share install).
  • alien_prop, alien_prop_meta, alien_prop_install, alien_prop_runtime β€” prints the meta, install and runtime properties for the Alien.
  • alien_realclean, alien_clean β€” removes the alien specific files. these targets get executed when you call the realclean and clean targets respectively.
  • alien_clean_install β€” cleans out the Alien's share directory.
⚠️ caution should be used in invoking alien_clean_install directly, because if you do not understand what you are doing you are likely to break your already installed Alien. like, actually break it. πŸ’€

mm_install

sub MY::install {
  $abmm->mm_install(@_);
}

EXPERIMENTAL

adds an install rule that cleans the final install dist directory before installing.


🌈 SEE ALSO 🌈

  • Alien::Build
  • Alien::Base
  • Alien
  • Dist::Zilla::Plugin::AlienBuild
  • Alien::Build::MB

πŸ‘‘ AUTHOR πŸ‘‘

Author: Graham Ollis <plicease@cpan.org>

Contributors:

  • Diab Jerius (DJERIUS)
  • Roy Storey (KIWIROY)
  • Ilya Pavlov
  • David Mertens (run4flat)
  • Mark Nunberg (mordy, mnunberg)
  • Christian Walde (Mithaldu)
  • Brian Wightman (MidLifeXis)
  • Zaki Mughal (zmughal)
  • mohawk (mohawk2, ETJ)
  • Vikas N Kumar (vikasnkumar)
  • Flavio Poletti (polettix)
  • Salvador FandiΓ±o (salva)
  • Gianni Ceccarelli (dakkar)
  • Pavel Shaydo (zwon, trinitum)
  • Kang-min Liu (εŠ‰εΊ·ζ°‘, gugod)
  • Nicholas Shipp (nshp)
  • Juan JuliΓ‘n Merelo GuervΓ³s (JJ)
  • Joel Berger (JBERGER)
  • Petr PΓ­saΕ™ (ppisar)
  • Lance Wicks (LANCEW)
  • Ahmad Fatoum (a3f, ATHREEF)
  • JosΓ© JoaquΓ­n Atria (JJATRIA)
  • Duke Leto (LETO)
  • Shoichi Kaji (SKAJI)
  • Shawn Laffan (SLAFFAN)
  • Paul Evans (leonerd, PEVANS)
  • HΓ₯kon HΓ¦gland (hakonhagland, HAKONH)
  • nick nauwelaerts (INPHOBIA)
  • Florian Weimer
  • Marcel Telka (mtelka)

this software is copyright (c) 2011-2022 by Graham Ollis.

this is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.


okay that's the whole page bestie, tysm for reading πŸ₯ΉπŸ’… this was rendered for perl v5.42.3 on 2026-09-21, brought to you by the Alien::Build::MM(3) manual page. slay, go build something alien. πŸ‘‘βœ¨πŸ¦‹

πŸ“¦ where this page comes from