File Coverage

blib/lib/UMLS/Norm.pm
Criterion Covered Total %
statement 7 19 36.8
branch 0 4 0.0
condition 0 2 0.0
subroutine 3 5 60.0
pod 0 2 0.0
total 10 32 31.2


line stmt bran cond sub pod time code
1             package UMLS::Norm;
2              
3 1     1   25759 use strict;
  1         2  
  1         43  
4 1     1   6 use warnings;
  1         2  
  1         343  
5              
6             our $VERSION = '0.01';
7              
8             our @EXPORT = qw(
9             start_norm
10             normalize
11             );
12              
13              
14             our $PATH;
15             $PATH = '/home/software/LuiNorm';
16             our ($I_NORM, $O_NORM);
17              
18             sub start_norm {
19 0 0 0 0 0   chdir( $_[0] || $PATH || die "Please specify the path of LUINORM program") or die $!;
20 0           my $pid = open2($I_NORM, $O_NORM, './luiNorm');
21             }
22              
23             END {
24 1     1   174 close $I_NORM;
25 0           close $O_NORM;
26             }
27              
28             sub tag {
29 0 0   0 0   my $text = shift or die "Please input text";
30 0           print {$O_NORM} $text."\n";
  0            
31 0           local $_;
32 0           my $result;
33 0           while($_ = <$I_NORM>){
34 0           $result .= $_;
35 0           last;
36             }
37 0           return $result;
38             }
39              
40              
41             1;
42             __END__