| 1 | package Types::QuacksLike; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | 3 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | 3 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | 3 | our $VERSION = '0.001001'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | 3 | $VERSION =~ tr/_//d; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | 3 | ▶ | use Type::Library -base; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | 3 | ▶ | use Types::Standard qw(ClassName Object); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | 3 | ▶ | BEGIN { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=3 SCAR=15.1
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | 3 | ▶ | if ("$]" >= 5.010_000) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | 3 | require mro; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | 3 | *_linear_isa = \&mro::get_linear_isa; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | 0 | local $@; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | # we don't care about order so we can ignore c3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | 0 | ▶ | eval <<'END_CODE' or die $@; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | sub _linear_isa($;$) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | my $class = shift; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | my @check = ($class); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | my @lin; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | my %found; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | while (defined(my $check = shift @check)) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | push @lin, $check; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | no strict 'refs'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | unshift @check, grep !$found{$_}++, @{"$check\::ISA"}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | return \@lin; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | END_CODE | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | 3 | ▶ | BEGIN { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=2 SCAR=10.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | 3 | local $@; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | 3 | ▶ | if (eval { require Sub::Util; defined &Sub::Util::subname }) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | 7 | ▶ | *_stash_name = sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | 7 | my $name = Sub::Util::subname($_[0]); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | 7 | $name =~ s{::[^:]+\z}{}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | 7 | $name; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | 3 | }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | 0 | require B; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | 0 | ▶ | *_stash_name = sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=4 SCAR=30.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | 0 | my ($coderef) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | 0 | ▶ | ref $coderef or return; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | 0 | my $cv = B::svref_2object($coderef); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | 0 | ▶ | $cv->isa('B::CV') or return; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | 0 | ▶ | $cv->GV->isa('B::SPECIAL') and return; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | 0 | $cv->GV->STASH->NAME; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | 0 | }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | 7 | ▶ | sub _methods_from_package { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_methods_from_package: called CC=10 SCAR=27.5
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | 7 | my $package = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | 3 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | 7 | ▶ | my $does | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | = $package->can('does') ? 'does' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | : $package->can('DOES') ? 'DOES' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | : undef; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 67 | 7 | my $stash = \%{"${package}::"}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | return | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | grep { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | 7 | my $code = \&{"${package}::$_"}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 71 | 7 | ▶ | my $code_stash = _stash_name($code) or next; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 72 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 73 | 7 | ▶ | /\A\(/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition25%3/12
/\A\(/ || $code_stash eq $package || $code_stash eq 'constant' || $does && $package->$does($code_stash)
/\A\(/ or $code_stash eq $package or $code_stash eq "constant"
/\A\(/ or $code_stash eq $package
$does and $package->$does($code_stash)
MC/DC0%0/5
/\A\(/ || $code_stash eq $package || $code_stash eq 'constant' || $does && $package->$does($code_stash)
/\A\(/
$code_stash eq $package
$code_stash eq "constant"
$does
$package->$does($code_stash)
Truth table16%1/6
A or B or C || D and E
A= /\A\(/B= $code_stash eq $packageC= $code_stash eq "constant"D= $doesE= $package->$does($code_stash)
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 74 | or $code_stash eq $package | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 75 | or $code_stash eq 'constant' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 76 | or $does && $package->$does($code_stash) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 77 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 78 | grep { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 79 | 7 | my $entry = $stash->{$_}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | 31 | ▶ | defined $entry && ref $entry ne 'HASH' && exists &{"${package}::$_"}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition50%3/6
defined $entry && ref $entry ne 'HASH' && exists &{"${package}::$_";}
defined $entry and ref $entry ne "HASH"
MC/DC33%1/3
defined $entry && ref $entry ne 'HASH' && exists &{"${package}::$_";}
defined $entry
ref $entry ne "HASH"
exists &{"${package}::$_";}
Truth table50%2/4
A and B && C
A= defined $entryB= ref $entry ne "HASH"C= exists &{"${package}::$_";}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 81 | } keys %$stash; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 82 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 83 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 84 | 8 | ▶ | sub _methods_of { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_methods_of: called CC=15 SCAR=36.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 85 | 8 | my $package = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | 8 | my @methods; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 87 | 8 | ▶ | if ($INC{'Moo/Role.pm'} && Moo::Role->is_role($package)) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 3 branches
Condition66%2/3
$INC{"Moo/Role.pm"} and "Moo::Role"->is_role($package)
MC/DC50%1/2
$INC{"Moo/Role.pm"} and "Moo::Role"->is_role($package)
$INC{"Moo/Role.pm"}
"Moo::Role"->is_role($package)
Truth table66%2/3
A and B
A= $INC{"Moo/Role.pm"}B= "Moo::Role"->is_role($package)
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 88 | 2 | @methods = Moo::Role->methods_provided_by($package); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 89 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 90 | ▶ | elsif ($INC{'Role/Tiny.pm'} && Role::Tiny->is_role($package)) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition66%2/3
$INC{"Role/Tiny.pm"} and "Role::Tiny"->is_role($package)
MC/DC50%1/2
$INC{"Role/Tiny.pm"} and "Role::Tiny"->is_role($package)
$INC{"Role/Tiny.pm"}
"Role::Tiny"->is_role($package)
Truth table66%2/3
A and B
A= $INC{"Role/Tiny.pm"}B= "Role::Tiny"->is_role($package)
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 91 | 2 | @methods = Role::Tiny->methods_provided_by($package); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 92 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 93 | ▶ | elsif ($INC{'Class/MOP.pm'} and my $meta = Class::MOP::class_of($package)) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition33%1/3
$INC{"Class/MOP.pm"} and my $meta = Class::MOP::class_of($package)
MC/DC0%0/2
$INC{"Class/MOP.pm"} and my $meta = Class::MOP::class_of($package)
$INC{"Class/MOP.pm"}
my $meta = Class::MOP::class_of($package)
Truth table33%1/3
A and B
A= $INC{"Class/MOP.pm"}B= my $meta = Class::MOP::class_of($package)
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 94 | # classes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 95 | 0 | ▶ | if ($meta->can('get_all_method_names')) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 96 | 0 | @methods = $meta->get_all_method_names; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 97 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 98 | # roles | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 99 | elsif ($meta->can('get_method_list')) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 100 | 0 | @methods = $meta->get_method_list; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 101 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 102 | # packages | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 103 | elsif ($meta->can('list_all_symbols')) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 104 | 0 | @methods = $meta->list_all_symbols('CODE'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 105 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 106 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 107 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 108 | 4 | my $moo_method; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 109 | 4 | ▶ | if ($INC{'Moo.pm'}) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 110 | 0 | ▶ | $moo_method = Moo->can('is_class') ? 'is_class' : '_accessor_maker_for'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 111 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 112 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 113 | 4 | my %s; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 114 | 4 | for my $isa (@{_linear_isa($package)}) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 115 | 7 | ▶ | if ($moo_method && Moo->$moo_method($isa)) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$moo_method and "Moo"->$moo_method($isa)
MC/DC0%0/2
$moo_method and "Moo"->$moo_method($isa)
$moo_method
"Moo"->$moo_method($isa)
Truth table33%1/3
A and B
A= $moo_methodB= "Moo"->$moo_method($isa)
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 116 | 0 | push @methods, grep !$s{$_}++, keys %{ Moo->_concrete_methods_of($isa) }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 117 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 118 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 119 | 7 | push @methods, grep !$s{$_}++, _methods_from_package($isa); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 120 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 121 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 122 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 123 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 124 | 8 | return grep !/\A_/, sort @methods; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 125 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 126 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 127 | 3 | my $meta = __PACKAGE__->meta; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 128 | 3 | my $class_name = ClassName; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 129 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 130 | $meta->add_type({ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 131 | name => "QuacksLike", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 132 | parent => Object, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 133 | 8 | ▶ | constraint_generator => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 134 | 8 | my @packages = map $class_name->assert_return($_), @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 135 | 8 | ▶ | return Object unless @packages; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 136 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 137 | 8 | my %s; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 138 | 8 | my @methods = sort grep !$s{$_}++, map _methods_of($_), @packages; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 139 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 140 | 8 | require Type::Tiny::Duck; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 141 | 8 | return Type::Tiny::Duck->new( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 142 | methods => \@methods, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 143 | display_name => sprintf('QuacksLike[%s]', join q[,], map qq{"$_"}, @packages), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 144 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 145 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 146 | 3 | }); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 147 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 148 | 3 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 149 | __END__ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||