lib/App/SeismicUnixGui/misc/sudata_in.pm untested

filter: Statementstmt 0.0% 0 / 24 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 4 totaltotal 0.0% 0 / 35 CC 2 SCAR 12.0
CC
2
Cov
0%
file_name
6.0
clear
2.0
get_max_index
2.0
CRAP 3.3
1 package App::SeismicUnixGui::misc::sudata_in;
2  
3 use Moose;
4 our $VERSION = '0.0.1';
5  
6 my $sudata_in = {
7 _file_name => '',
8 _type => '',
9 _Step => '',
10 _notes_aref => '',
11 };
12  
13 =head2 subroutine clear
14  
15 sets all variable strings to ''
16  
17 =cut
18  
19 sub clear {
20 $sudata_in->{_file_name} = '';
21 $sudata_in->{_type} = '';
22 $sudata_in->{_Step} = '';
23 $sudata_in->{_note} = '';
24 $sudata_in->{_notes_aref} = '';
25 }
26  
27 my @notes;
28  
29 # define a value
30 my $newline = '
31 ';
32  
33 =head2 sub file_name you need to know how many numbers per line
34 will be in the output file
35  
36 =cut
37  
38 sub file_name {
39 my ( $variable, $file_name ) = @_;
40 if ($file_name) {
41 $sudata_in->{_file_name} = $file_name;
42 $sudata_in->{_note} =
43 $sudata_in->{_note} . ' sudata_in=' . $sudata_in->{_file_name};
44 $sudata_in->{_Step} =
45 $sudata_in->{_Step} . ' sudata_in=' . $sudata_in->{_file_name};
46 }
47 }
48  
49 =head2 sub get_max_index
50  
51 max index = number of input variables -1
52  
53 =cut
54  
55 sub get_max_index {
56 my ($self) = @_;
57  
58 # only file_name : index=0
59 my $max_index = 0;
60  
61 return ($max_index);
62 }
63  
64 =pod
65  
66 =head2 subroutine note
67 adds the program name
68  
69 =cut
70  
71 sub notes_aref {
72 my ($self) = @_;
73  
74 $notes[1] = "\t" . '$sudata_in[1] = ' . $sudata_in->{_note};
75  
76 $sudata_in->{_notes_aref} = \@notes;
77  
78 return $sudata_in->{_notes_aref};
79 }
80  
81 1;