File Coverage

blib/lib/Text/NumericData/App/txdstatistics.pm
Criterion Covered Total %
statement 11 11 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 0 2 0.0
total 15 17 88.2


line stmt bran cond sub pod time code
1             package Text::NumericData::App::txdstatistics;
2              
3 1     1   1401 use Text::NumericData::Stat;
  1         4  
  1         43  
4 1     1   9 use Text::NumericData::App;
  1         3  
  1         187  
5              
6             # This is just a placeholder because of a past build system bug.
7             # The one and only version for Text::NumericData is kept in
8             # the Text::NumericData module itself.
9             our $VERSION = '1';
10             $VERSION = eval $VERSION;
11              
12             #the infostring says it all
13             my $infostring = "do basic statistics on textual data files
14              
15             $0 < data.dat
16             would yield in some statistics about the columns in the file being printed.
17              
18             This is designed as an enhancement over txdmean, giving info like standard error in a more extensible format (to later add more measures).";
19              
20             our @ISA = ('Text::NumericData::App');
21              
22             sub new
23             {
24 1     1 0 85 my $class = shift;
25              
26 1         16 return $class->SUPER::new
27             ({
28             parconf=>
29             {
30             info=>$infostring # default version
31             # default author
32             # default copyright
33             },
34             filemode=>1
35             ,pipemode=>1
36             ,pipe_file=>\&process_file
37             });
38             }
39              
40             sub process_file
41             {
42 1     1 0 3 my $self = shift;
43 1         5 my $out = Text::NumericData::Stat::generate($self->{txd});
44 1         5 $out->write_all($self->{out});
45             }
46              
47             1;