| 1 | package MooseX::DeclareX::Plugin::types; | ||||||||||||
| 2 | |||||||||||||
| 3 | 1 | ▶ | BEGIN { | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | 1 | $MooseX::DeclareX::Plugin::types::AUTHORITY = 'cpan:TOBYINK'; | |||||||||||
| 5 | 1 | $MooseX::DeclareX::Plugin::types::VERSION = '0.009'; | |||||||||||
| 6 | } | ||||||||||||
| 7 | |||||||||||||
| 8 | 1 | ▶ | use Moose; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 9 | 1 | with 'MooseX::DeclareX::Plugin'; | |||||||||||
| 10 | |||||||||||||
| 11 | 1 | ▶ | use MooseX::Declare (); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 12 | 1 | ▶ | use Moose::Util (); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 13 | 1 | ▶ | use Data::OptList; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 14 | |||||||||||||
| 15 | sub plugin_setup | ||||||||||||
| 16 | 6 | ▶ | { | ||||||||||
|
Subroutine
plugin_setup: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||
| 17 | 6 | my ($class, $kw, $opt) = @_; | |||||||||||
| 18 | 6 | $opt = Data::OptList::mkopt($opt); | |||||||||||
| 19 | |||||||||||||
| 20 | my @codeparts = map { | ||||||||||||
| 21 | 6 | my ($module, $terms) = @$_; | |||||||||||
| 22 | 6 | $module =~ s/^-/MooseX::Types::/; | |||||||||||
| 23 | 6 | ▶ | $terms ||= ['-all']; | ||||||||||
|
Condition50%1/2
$terms ||= ["-all"]
MC/DC0%0/1
$terms ||= ["-all"]
$terms
Truth table50%1/2
A
A= $terms
| |||||||||||||
| 24 | 6 | sprintf('use %s qw(%s)', $module, join q[ ], @$terms); | |||||||||||
| 25 | } @$opt; | ||||||||||||
| 26 | |||||||||||||
| 27 | $kw->meta->add_after_method_modifier( | ||||||||||||
| 28 | 1 | ▶ | add_namespace_customizations => sub { | ||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||
| 29 | 1 | my ($self, $ctx, $package) = @_; | |||||||||||
| 30 | 1 | $ctx->add_preamble_code_parts(@codeparts); | |||||||||||
| 31 | }, | ||||||||||||
| 32 | 6 | ); | |||||||||||
| 33 | } | ||||||||||||
| 34 | |||||||||||||
| 35 | 1 | 1; | |||||||||||
| 36 | |||||||||||||