The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

App::hopen::Asset - record representing a file to be produced

SYNOPSIS

An asset is something to be produced, e.g., a file on disk or something else that could be a target in a Makefile.

ATTRIBUTES

target

TODO: should on-disk targets be required to be BasedPath instances?

The name of the asset. Must be one of:

  • A Path::Class instance, representing a file or directory on disk

  • An App::hopen::Util::BasedPath instance, representing a file or directory on disk

  • Something that stringifies to a non-disk target (e.g., a goal). Anything in this category will be stored as its stringified value, NOT as its original value.

No default, so don't call $obj->target until you've assigned a target!

made_by

The App::hopen::G::Cmd (or subclass) instance that produced this asset. Used to distinguish assets from different sources.

name

An optional asset name. If you don't specify one, a unique one will be generated automatically.

METHODS

isdisk

Returns truthy if the "target" is an on-disk entity, i.e., a directory or file.

BUILD

Enforces the requirement for target and made_by.