File Coverage

blib/lib/Devel/AssertApplicationCapabilities/_Base.pm
Criterion Covered Total %
statement 13 13 100.0
branch 2 2 100.0
condition 1 2 50.0
subroutine 4 4 100.0
pod n/a
total 20 21 95.2


line stmt bran cond sub pod time code
1             package Devel::AssertApplicationCapabilities::_Base;
2              
3 5     5   884 use strict;
  5         13  
  5         173  
4 5     5   25 use vars qw($VERSION);
  5         11  
  5         234  
5             local $^W = 1;
6 5     5   25 use Devel::CheckApplicationCapabilities;
  5         9  
  5         856  
7             $VERSION = '1.0';
8              
9             sub import {
10 40     40   253 my $class = shift;
11 40         81 my $app = shift;
12              
13             # can't just $class->app_is(...) later because $class isn't really a class.
14 40   50     449 my $app_is = $class->can('app_is') ||
15             die("$class doesn't implement app_is. YOU FAIL\n");
16              
17 40 100       275 Devel::CheckApplicationCapabilities::die_unsupported()
18             unless($app_is->($app));
19             }
20              
21             =head1 COPYRIGHT and LICENCE
22              
23             Copyright 2010 David Cantrell
24              
25             This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively.
26              
27             =cut
28              
29             1;