The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Beam::Make::Recipe - The base class for Beam::Make recipes

VERSION

version 0.003

SYNOPSIS

package My::Recipe;
use v5.20;
use Moo;
use experimental qw( signatures );
extends 'Beam::Make::Recipe';

# Make the recipe
sub make( $self ) {
    ...;
}

# Return a Time::Piece object for when this recipe was last
# performed, or 0 if it can't be determined.
sub last_modified( $self ) {
    ...;
}

DESCRIPTION

This is the base Beam::Make recipe class. Extend this to build your own recipe components.

ATTRIBUTES

name

The name of the recipe. This is the key in the Beamfile used to refer to this recipe.

requires

An array of recipe names that this recipe depends on.

cache

A Beam::Make::Cache object. This is used to store content hashes and modified dates for later use.

METHODS

fill_env

Fill in any environment variables in the given array of strings. Environment variables are interpreted as a POSIX shell: $name or ${name}.

REQUIRED METHODS

make

This method performs the work of the recipe. There is no return value.

last_modified

This method returns a Time::Piece object for when this recipe was last performed, or 0 otherwise. This method could use the "cache" object to read a cached date. See Beam::Make::Cache for more information.

SEE ALSO

Beam::Make

AUTHOR

Doug Bell <preaction@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2020 by Doug Bell.

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