| 1 | package Bolts::Meta::Class::Trait::Locator; | ||
| 2 | 10 | $Bolts::Meta::Class::Trait::Locator::VERSION = '0.143170'; | |
| 3 | # ABSTRACT: Metaclass role for objects that have a meta locator | ||
| 4 | |||
| 5 | 10 | ▶ | use Moose::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 10 | ▶ | use Bolts::Meta::Locator; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | |||
| 10 | 10 | has locator => ( | |
| 11 | is => 'rw', | ||
| 12 | does => 'Bolts::Role::Locator', | ||
| 13 | lazy_build => 1, | ||
| 14 | ); | ||
| 15 | |||
| 16 | sub _build_locator { | ||
| 17 | 18 | ▶ | $Bolts::GLOBAL_FALLBACK_META_LOCATOR->new; |
|
Subroutine
_build_locator: called CC=1 SCAR=0.0
| |||
| 18 | } | ||
| 19 | |||
| 20 | |||
| 21 | 158 | ▶ | sub acquire { shift->locator->acquire(@_) } |
|
Subroutine
acquire: called CC=1 SCAR=0.0
Pod
documented
| |||
| 22 | 0 | ▶ | sub acquire_all { shift->locator->acquire_all(@_) } |
|
Subroutine
acquire_all: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 23 | 0 | ▶ | sub resolve { shift->locator->resolve(@_) } |
|
Subroutine
resolve: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 24 | 0 | ▶ | sub get { shift->locator->get(@_) } |
|
Subroutine
get: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 25 | |||
| 26 | 10 | with 'Bolts::Role::Locator'; | |
| 27 | |||
| 28 | 10 | 1; | |
| 29 | |||
| 30 | __END__ | ||
| 31 | |||
| 32 | =pod | ||
| 33 | |||
| 34 | =encoding UTF-8 | ||
| 35 | |||
| 36 | =head1 NAME | ||
| 37 | |||
| 38 | Bolts::Meta::Class::Trait::Locator - Metaclass role for objects that have a meta locator | ||
| 39 | |||
| 40 | =head1 VERSION | ||
| 41 | |||
| 42 | version 0.143170 | ||
| 43 | |||
| 44 | =head1 DESCRIPTION | ||
| 45 | |||
| 46 | This is another handy feature for use when constructing and managing a bag of artifacts. It provides a meta locator to the class for looking up standard Bolts objects like blueprints, scopes, injectors, inferrers, etc. | ||
| 47 | |||
| 48 | =head1 ROLES | ||
| 49 | |||
| 50 | =over | ||
| 51 | |||
| 52 | =item * | ||
| 53 | |||
| 54 | L<Bolts::Role::Locator> | ||
| 55 | |||
| 56 | =back | ||
| 57 | |||
| 58 | =head1 ATTRIBUTES | ||
| 59 | |||
| 60 | =head2 locator | ||
| 61 | |||
| 62 | This returns an implementation of L<Bolts::Role::Locator> containing the needed standard Bolts objects. | ||
| 63 | |||
| 64 | Defaults to a new object from L<Bolts/$Bolts::GLOBAL_FALLBACK_META_LOCATOR>, which defaults to L<Bolts::Meta::Locator>. | ||
| 65 | |||
| 66 | =head2 acquire | ||
| 67 | |||
| 68 | Delegated to the C<acquire> method of L</locator>. | ||
| 69 | |||
| 70 | =head2 acquire_all | ||
| 71 | |||
| 72 | Delegated to the C<acquire_all> method of L</locator>. | ||
| 73 | |||
| 74 | =head2 resolve | ||
| 75 | |||
| 76 | Delegated to the C<resolve> method of L</locator>. | ||
| 77 | |||
| 78 | =head2 get | ||
| 79 | |||
| 80 | Delegated to the C<get> method of L</locator>. | ||
| 81 | |||
| 82 | =head1 AUTHOR | ||
| 83 | |||
| 84 | Andrew Sterling Hanenkamp <hanenkamp@cpan.org> | ||
| 85 | |||
| 86 | =head1 COPYRIGHT AND LICENSE | ||
| 87 | |||
| 88 | This software is copyright (c) 2014 by Qubling Software LLC. | ||
| 89 | |||
| 90 | This is free software; you can redistribute it and/or modify it under | ||
| 91 | the same terms as the Perl 5 programming language system itself. | ||
| 92 | |||
| 93 | =cut | ||