File Coverage

blib/lib/me/inlined.pm
Criterion Covered Total %
statement 16 16 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 21 21 100.0


line stmt bran cond sub pod time code
1 2     2   49636 use strict;
  2         5  
  2         87  
2 2     2   11 use warnings;
  2         5  
  2         113  
3             package me::inlined;
4             # git description: v0.001-13-g2d6093f
5             $me::inlined::VERSION = '0.002';
6             # ABSTRACT: EXPERIMENTAL - define multiple packages in one file, and reference them in any order
7             # KEYWORDS: development module package file inline declaration
8             # vim: set ts=8 sw=4 tw=78 et :
9              
10 2     2   1777 use Module::Runtime 'module_notional_filename';
  2         3835  
  2         11  
11              
12             sub import
13             {
14 2     2   14 my $self = shift;
15 2         7 my ($caller, $caller_file) = caller;
16 2         8 my $filename = module_notional_filename($caller);
17 2         215 $::INC{$filename} = $caller_file;
18             }
19              
20             {
21 2     2   198 no strict 'refs';
  2         5  
  2         152  
22             delete ${ __PACKAGE__ . '::' }{module_notional_filename};
23             }
24             1;
25              
26             __END__