Bolts

 view release on metacpan or  search on metacpan

lib/Bolts/Artifact.pm  view on Meta::CPAN

package Bolts::Artifact;
$Bolts::Artifact::VERSION = '0.143171';
# ABSTRACT: Tools for resolving an artifact value

use Moose;

with 'Bolts::Role::Artifact';

use Bolts::Util qw( locator_for meta_locator_for );
use Carp ();
use List::MoreUtils qw( all );
use Moose::Util::TypeConstraints;
use Safe::Isa;
use Scalar::Util qw( weaken reftype );


has init_locator => (
    is          => 'ro',
    does        => 'Bolts::Role::Locator',
    weak_ref    => 1,
);

with 'Bolts::Role::Initializer';


has name => (
    is          => 'ro',
    isa         => 'Str',
    required    => 1,
);


has blueprint => (
    is          => 'ro',
    does        => 'Bolts::Blueprint',
    required    => 1,
    traits      => [ 'Bolts::Initializer' ],
);


has scope => (
    is          => 'ro',
    does        => 'Bolts::Scope',
    required    => 1,
    traits      => [ 'Bolts::Initializer' ],
);


has infer => (
    is          => 'ro',
    isa         => enum([qw( none options acquisition )]),
    required    => 1,
    default     => 'none',
);


has inference_done => (
    reader      => 'is_inference_done',
    writer      => 'inference_is_done',
    isa         => 'Bool',
    required    => 1,
    default     => 0,
    init_arg    => undef,
);


subtype 'Bolts::Injector::List',
     as 'ArrayRef',
  where { all { $_->$_does('Bolts::Injector') } @$_ };

has injectors => (
    is          => 'ro',
    isa         => 'Bolts::Injector::List',
    required    => 1,



( run in 0.945 second using v1.01-cache-2.11-cpan-d7f47b0818f )