File Coverage

lib/AutoCode/CustomMaker.pm
Criterion Covered Total %
statement 16 16 100.0
branch 1 2 50.0
condition n/a
subroutine 4 4 100.0
pod n/a
total 21 22 95.4


line stmt bran cond sub pod time code
1             package AutoCode::CustomMaker;
2 1     1   8415 use strict;
  1         3  
  1         31  
3 1     1   340 use AutoCode::ModuleLoader;
  1         3  
  1         6  
4              
5             sub import {
6 1     1   8 my ($pkg, $schema, $type, $prefix)=@_;
7 1 50       3 return unless $pkg eq __PACKAGE__; # STOP the child misuse it.
8 1         3 my $callpkg=caller;
9 1         3 AutoCode::ModuleLoader->load_schema($schema, $prefix);
10            
11 1         8 my $vp = AutoCode::ModuleLoader->load($type);
12 1     1   5 no strict 'refs';
  1         1  
  1         53  
13 1         2 push @{"$callpkg\::ISA"} , $vp;
  1         125  
14             }
15             1;