lib/App/SeismicUnixGui/sunix/data/ctrlstrip.pm untested

filter: Statementstmt 0.0% 0 / 36 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 9 Podpod 0.0% 0 / 5 totaltotal 0.0% 0 / 50 CC 1 SCAR 6.9
CC
1
Cov
0%
Step
2.0
note
2.0
clear
2.0
CRAP 2.0
1 package App::SeismicUnixGui::sunix::data::ctrlstrip;
2  
3 =head2 SYNOPSIS
4  
5 PERL PROGRAM NAME:
6  
7 AUTHOR: Juan Lorenzo (Perl module only)
8  
9 DATE:
10  
11 DESCRIPTION:
12  
13 Version:
14  
15 =head2 USE
16  
17 =head3 NOTES
18  
19 =head4 Examples
20  
21 =head2 SYNOPSIS
22  
23 =head3 SEISMIC UNIX NOTES
24 CTRLSTRIP - Strip non-graphic characters
25  
26  
27  
28 ctrlstrip <dirtyfile >cleanfile
29  
30
31  
32 opt=null
33  
34 =head2 User's notes (Juan Lorenzo)
35 untested
36  
37 =cut
38  
39  
40 =head2 CHANGES and their DATES
41  
42 =cut
43  
44 use Moose;
45 our $VERSION = '0.0.1';
46  
47  
48 =head2 Import packages
49  
50 =cut
51  
52 use aliased 'App::SeismicUnixGui::misc::L_SU_global_constants';
53  
54 use App::SeismicUnixGui::misc::SeismicUnix qw($in $out $on $go $to $suffix_ascii $off $suffix_su $suffix_bin);
55 use aliased 'App::SeismicUnixGui::configs::big_streams::Project_config';
56  
57  
58 =head2 instantiation of packages
59  
60 =cut
61  
62 my $get = L_SU_global_constants->new();
63 my $Project = Project_config->new();
64 my $DATA_SEISMIC_SU = $Project->DATA_SEISMIC_SU();
65 my $DATA_SEISMIC_BIN = $Project->DATA_SEISMIC_BIN();
66 my $DATA_SEISMIC_TXT = $Project->DATA_SEISMIC_TXT();
67  
68 my $var = $get->var();
69 my $on = $var->{_on};
70 my $off = $var->{_off};
71 my $true = $var->{_true};
72 my $false = $var->{_false};
73 my $empty_string = $var->{_empty_string};
74  
75 =head2 Encapsulated
76 hash of private variables
77  
78 =cut
79  
80 my $ctrlstrip = {
81 _opt => '',
82 _Step => '',
83 _note => '',
84  
85 };
86  
87 =head2 sub Step
88  
89 collects switches and assembles bash instructions
90 by adding the program name
91  
92 =cut
93  
94 sub Step {
95  
96 $ctrlstrip->{_Step} = 'ctrlstrip'.$ctrlstrip->{_Step};
97 return ( $ctrlstrip->{_Step} );
98  
99 }
100  
101  
102 =head2 sub note
103  
104 collects switches and assembles bash instructions
105 by adding the program name
106  
107 =cut
108  
109 sub note {
110  
111 $ctrlstrip->{_note} = 'ctrlstrip'.$ctrlstrip->{_note};
112 return ( $ctrlstrip->{_note} );
113  
114 }
115  
116  
117  
118 =head2 sub clear
119  
120 =cut
121  
122 sub clear {
123  
124 $ctrlstrip->{_opt} = '';
125 $ctrlstrip->{_Step} = '';
126 $ctrlstrip->{_note} = '';
127 }
128  
129  
130 =head2 sub opt
131  
132  
133 =cut
134  
135 sub opt {
136  
137 my ( $self,$opt ) = @_;
138 # if ( $opt ne $empty_string ) {
139 #
140 # $ctrlstrip->{_opt} = $opt;
141 # $ctrlstrip->{_note} = $ctrlstrip->{_note}.' '.$ctrlstrip->{_opt};
142 # $ctrlstrip->{_Step} = $ctrlstrip->{_Step}.' '.$ctrlstrip->{_opt};
143 #
144 # } else {
145 # print("ctrlstrip, opt, missing opt,\n");
146 # }
147 }
148  
149  
150 =head2 sub get_max_index
151  
152 max index = number of input variables -1
153
154 =cut
155
156 sub get_max_index {
157 my ($self) = @_;
158 my $max_index = 0;
159  
160 return($max_index);
161 }
162
163
164 1;