File Coverage

blib/lib/Moose/Exception/CannotLocatePackageInINC.pm
Criterion Covered Total %
statement 8 8 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 10 10 100.0


line stmt bran cond sub pod time code
1             package Moose::Exception::CannotLocatePackageInINC;
2             our $VERSION = '2.2206';
3              
4 3     3   1850 use Moose;
  3         8  
  3         41  
5             extends 'Moose::Exception';
6             with 'Moose::Exception::Role::ParamsHash';
7              
8             has 'INC' => (
9             is => 'ro',
10             isa => 'ArrayRef',
11             required => 1
12             );
13              
14             has 'possible_packages' => (
15             is => 'ro',
16             isa => 'Str',
17             required => 1
18             );
19              
20             has 'metaclass_name' => (
21             is => 'ro',
22             isa => 'Str',
23             required => 1
24             );
25              
26             has 'type' => (
27             is => 'ro',
28             isa => 'Str',
29             required => 1,
30             );
31              
32             sub _build_message {
33 4     4   9 my $self = shift;
34 4         145 my $possible_packages = $self->possible_packages;
35 4         10 my @inc = @{$self->INC};
  4         136  
36              
37 4         138 return "Can't locate $possible_packages in \@INC (\@INC contains: @INC)."
38             }
39              
40             __PACKAGE__->meta->make_immutable;
41             1;