| 1 | package Text::NumericData::App::txdstatistics; | ||
| 2 | |||
| 3 | 1 | ▶ | use Text::NumericData::Stat; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use Text::NumericData::App; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 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 | 1 | our $VERSION = '1'; | |
| 10 | 1 | $VERSION = eval $VERSION; | |
| 11 | |||
| 12 | #the infostring says it all | ||
| 13 | 1 | 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 | 1 | our @ISA = ('Text::NumericData::App'); | |
| 21 | |||
| 22 | sub new | ||
| 23 | { | ||
| 24 | 1 | ▶ | my $class = shift; |
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 25 | |||
| 26 | 1 | 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 | ▶ | my $self = shift; |
|
Subroutine
process_file: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 43 | 1 | my $out = Text::NumericData::Stat::generate($self->{txd}); | |
| 44 | 1 | $out->write_all($self->{out}); | |
| 45 | } | ||
| 46 | |||
| 47 | 1 | 1; | |