« blib/lib/Moose/Exception/PackageDoesNotUseMooseExporter.pm
↑ Summary
blib/lib/Moose/Exception/RequiredMethodsNotImplementedByClass.pm »
| 1 | package Moose::Exception::PackagesAndModulesAreNotCachable; | ||||||||||
| 2 | 3 | our $VERSION = '2.4001'; | |||||||||
| 3 | |||||||||||
| 4 | 3 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 3 | extends 'Moose::Exception'; | |||||||||
| 6 | 3 | with 'Moose::Exception::Role::Class', 'Moose::Exception::Role::ParamsHash'; | |||||||||
| 7 | |||||||||||
| 8 | 3 | has 'is_module' => ( | |||||||||
| 9 | is => 'ro', | ||||||||||
| 10 | isa => 'Bool', | ||||||||||
| 11 | required => 1 | ||||||||||
| 12 | ); | ||||||||||
| 13 | |||||||||||
| 14 | 3 | ▶ | sub _build_message { | ||||||||
|
Subroutine
_build_message: called CC=2 SCAR=6.9
| |||||||||||
| 15 | 3 | my $self = shift; | |||||||||
| 16 | 3 | my $is_module = $self->is_module; | |||||||||
| 17 | |||||||||||
| 18 | 3 | ▶ | if( $is_module ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 19 | 1 | return "Modules are not cacheable"; | |||||||||
| 20 | } else { | ||||||||||
| 21 | 2 | return "Packages are not cacheable"; | |||||||||
| 22 | } | ||||||||||
| 23 | } | ||||||||||
| 24 | |||||||||||
| 25 | 3 | __PACKAGE__->meta->make_immutable; | |||||||||
| 26 | 3 | 1; | |||||||||