| 1 | package Bolts::Locator; | ||||||||||
| 2 | 11 | $Bolts::Locator::VERSION = '0.143171'; | |||||||||
| 3 | # ABSTRACT: General purpose locator | ||||||||||
| 4 | |||||||||||
| 5 | 11 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | |||||||||||
| 8 | 11 | has root => ( | |||||||||
| 9 | is => 'ro', | ||||||||||
| 10 | isa => 'HashRef|ArrayRef|Object', | ||||||||||
| 11 | required => 1, | ||||||||||
| 12 | ); | ||||||||||
| 13 | |||||||||||
| 14 | 11 | with 'Bolts::Role::RootLocator'; | |||||||||
| 15 | |||||||||||
| 16 | |||||||||||
| 17 | 0 | ▶ | override BUILDARGS => sub { | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||
| 18 | 0 | my $class = shift; | |||||||||
| 19 | |||||||||||
| 20 | 0 | ▶ | if (@_ == 1) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 21 | 0 | return { root => $_[0] }; | |||||||||
| 22 | } | ||||||||||
| 23 | else { | ||||||||||
| 24 | 0 | return super(); | |||||||||
| 25 | } | ||||||||||
| 26 | 11 | }; | |||||||||
| 27 | |||||||||||
| 28 | 11 | __PACKAGE__->meta->make_immutable; | |||||||||
| 29 | |||||||||||
| 30 | __END__ | ||||||||||