Alien-Build

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

      (The developer of Alien::libfoo should provide the documentation
      necessary, but if not, this is the place to start).

    Alien::Build::Manual::AlienAuthor

      If you are writing your own Alien based on Alien::Build and
      Alien::Base.

    Alien::Build::Manual::FAQ

      If you have a common question that has already been answered, like
      "How do I use alienfile with some build system".

    Alien::Build::Manual::PluginAuthor

      This is for the brave souls who want to write plugins that will work
      with Alien::Build + alienfile.

    Alien::Build::Manual::Security

      If you are concerned that Aliens might be downloading tarballs off
      the internet, then this is the place for you. This will discuss some
      of the risks of downloading (really any) software off the internet
      and will give you some tools to remediate these risks.

    Note that you will not usually create a Alien::Build instance directly,
    but rather be using a thin installer layer, such as Alien::Build::MM
    (for use with ExtUtils::MakeMaker) or Alien::Build::MB (for use with
    Module::Build). One of the goals of this project is to remain installer
    agnostic.

CONSTRUCTORS

 new

     my $build = Alien::Build->new;

    This creates a new empty instance of Alien::Build. Normally you will
    want to use load below to create an instance of Alien::Build from an
    alienfile recipe.

 load

     my $build = Alien::Build->load($alienfile);

    This creates an Alien::Build instance with the given alienfile recipe.

 resume

     my $build = Alien::Build->resume($alienfile, $root);

    Load a checkpointed Alien::Build instance. You will need the original
    alienfile and the build root (usually _alien), and a build that had
    been properly checkpointed using the checkpoint method below.

PROPERTIES

    There are three main properties for Alien::Build. There are a number of
    properties documented here with a specific usage. Note that these
    properties may need to be serialized into something primitive like JSON
    that does not support: regular expressions, code references of blessed
    objects.

    If you are writing a plugin (Alien::Build::Plugin) you should use a
    prefix like "plugin_name" (where name is the name of your plugin) so
    that it does not interfere with other plugin or future versions of
    Alien::Build. For example, if you were writing
    Alien::Build::Plugin::Fetch::NewProtocol, please use the prefix
    plugin_fetch_newprotocol:

     sub init
     {
       my($self, $meta) = @_;
     
       $meta->prop( plugin_fetch_newprotocol_foo => 'some value' );
     
       $meta->register_hook(
         some_hook => sub {
           my($build) = @_;
           $build->install_prop->{plugin_fetch_newprotocol_bar} = 'some other value';
           $build->runtime_prop->{plugin_fetch_newprotocol_baz} = 'and another value';
         }
       );
     }

    If you are writing a alienfile recipe please use the prefix my_:

     use alienfile;
     
     meta_prop->{my_foo} = 'some value';
     
     probe sub {
       my($build) = @_;
       $build->install_prop->{my_bar} = 'some other value';
       $build->install_prop->{my_baz} = 'and another value';
     };

    Any property may be used from a command:

     probe [ 'some command %{.meta.plugin_fetch_newprotocol_foo}' ];
     probe [ 'some command %{.install.plugin_fetch_newprotocol_bar}' ];
     probe [ 'some command %{.runtime.plugin_fetch_newprotocol_baz}' ];
     probe [ 'some command %{.meta.my_foo}' ];
     probe [ 'some command %{.install.my_bar}' ];
     probe [ 'some command %{.runtime.my_baz}' ];

 meta_prop

     my $href = $build->meta_prop;
     my $href = Alien::Build->meta_prop;

    Meta properties have to do with the recipe itself, and not any
    particular instance that probes or builds that recipe. Meta properties
    can be changed from within an alienfile using the meta_prop directive,
    or from a plugin from its init method (though should NOT be modified
    from any hooks registered within that init method). This is not
    strictly enforced, but if you do not follow this rule your recipe will
    likely be broken.

    arch



( run in 0.693 second using v1.01-cache-2.11-cpan-172d661cebc )