| 1 | package Exporter::Shiny; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 13 | ▶ | use 5.006001; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 13 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 13 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | 13 | ▶ | use Exporter::Tiny (); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||
| 9 | 13 | our $AUTHORITY = 'cpan:TOBYINK'; | |||||||||||||||||||||||||||
| 10 | 13 | our $VERSION = '1.005_000'; | |||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | sub import { | ||||||||||||||||||||||||||||
| 13 | 15 | ▶ | my $me = shift; | ||||||||||||||||||||||||||
|
Subroutine
import: called CC=8 SCAR=20.9
| |||||||||||||||||||||||||||||
| 14 | 15 | my $caller = caller; | |||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | 15 | (my $nominal_file = $caller) =~ s(::)(/)g; | |||||||||||||||||||||||||||
| 17 | 15 | ▶ | $INC{"$nominal_file\.pm"} ||= __FILE__; | ||||||||||||||||||||||||||
|
Condition50%1/2
$INC{"$nominal_file.pm"} ||= __FILE__
MC/DC0%0/1
$INC{"$nominal_file.pm"} ||= __FILE__
$INC{"$nominal_file.pm"}
Truth table50%1/2
A
A= $INC{"$nominal_file.pm"}
| |||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||
| 19 | 15 | ▶ | if (@_ == 2 and $_[0] eq -setup) | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
@_ == 2 and $_[0] eq "-setup"
MC/DC100%2/2
@_ == 2 and $_[0] eq "-setup"
@_ == 2
$_[0] eq "-setup"
Truth table100%3/3
A and B
A= @_ == 2B= $_[0] eq "-setup"
| |||||||||||||||||||||||||||||
| 20 | { | ||||||||||||||||||||||||||||
| 21 | 2 | my (undef, $opts) = @_; | |||||||||||||||||||||||||||
| 22 | 2 | ▶ | @_ = @{ delete($opts->{exports}) || [] }; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||
| 24 | 2 | ▶ | if (%$opts) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 25 | 1 | Exporter::Tiny::_croak( | |||||||||||||||||||||||||||
| 26 | 'Unsupported Sub::Exporter-style options: %s', | ||||||||||||||||||||||||||||
| 27 | join(q[, ], sort keys %$opts), | ||||||||||||||||||||||||||||
| 28 | ); | ||||||||||||||||||||||||||||
| 29 | } | ||||||||||||||||||||||||||||
| 30 | } | ||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||
| 32 | 14 | ▶ | ref($_) && Exporter::Tiny::_croak('Expected sub name, got ref %s', $_) for @_; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||
| 34 | 13 | ▶ | no strict qw(refs); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 35 | 14 | push @{"$caller\::ISA"}, 'Exporter::Tiny'; | |||||||||||||||||||||||||||
| 36 | 14 | push @{"$caller\::EXPORT_OK"}, @_; | |||||||||||||||||||||||||||
| 37 | } | ||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||
| 39 | 13 | 1; | |||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||
| 41 | __END__ | ||||||||||||||||||||||||||||