File Coverage

blib/lib/Devel/AssertApplicationCapabilities/GNU.pm
Criterion Covered Total %
statement 12 12 100.0
branch 2 2 100.0
condition n/a
subroutine 5 5 100.0
pod 0 1 0.0
total 19 20 95.0


line stmt bran cond sub pod time code
1             package Devel::AssertApplicationCapabilities::GNU;
2              
3 1     1   22 use strict;
  1         3  
  1         39  
4 1     1   5 use vars qw($VERSION);
  1         2  
  1         48  
5             local $^W = 1;
6             $VERSION = '1.0';
7 1     1   561 use base qw(Devel::AssertApplicationCapabilities::_Base);
  1         2  
  1         225  
8              
9             sub app_is {
10 3     3 0 7 my $app = shift;
11              
12             Devel::CheckApplicationCapabilities::_with_STDERR_closed(sub {
13 3 100   3   28214 qx{$app --version} =~ /\b(gnu|free software foundation)\b/i ? 1 : 0;
14 3         28 });
15             }
16              
17             =head1 COPYRIGHT and LICENCE
18              
19             Copyright 2010 David Cantrell
20              
21             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.
22              
23             =cut
24              
25             1;