lib/App/SeismicUnixGui/configs/big_streams/BackupProject_config.pm untested

filter: Statementstmt 0.0% 0 / 40 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 8 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 50 CC 1 SCAR 6.9
CC
1
Cov
0%
get_values
2.0
get_max_index
2.0
BEGIN
2.0
CRAP 2.0
1 package App::SeismicUnixGui::configs::big_streams::BackupProject_config;
2  
3 =head1 DOCUMENTATION
4  
5 =head2 SYNOPSIS
6  
7 PERL PERL PROGRAM NAME: BackupProject_config.pm
8 AUTHOR: Juan Lorenzo
9 DATE: June 23 2024
10  
11
12 DESCRIPTION Configuration file set to elicit
13 project name via reading BackupProject.config file
14  
15 USED FOR
16  
17 Version 1 Based on Sucat_config.pm
18
19 =cut
20  
21 =head2 LOCAL VARIABLES FOR THIS PROJECT
22
23 =cut
24  
25 use Moose;
26 our $VERSION = '1.0.1';
27 use App::SeismicUnixGui::misc::control '0.0.3';
28 use aliased 'App::SeismicUnixGui::misc::control';
29 use aliased 'App::SeismicUnixGui::misc::config_superflows';
30 use aliased 'App::SeismicUnixGui::configs::big_streams::Project_config';
31 use aliased 'App::SeismicUnixGui::misc::L_SU_global_constants';
32  
33 my $get = L_SU_global_constants->new();
34 my $config_superflows = config_superflows->new();
35 my $control = control->new();
36 my $Project = Project_config->new();
37  
38 my $inbound_directory = $Project->DATA_SEISMIC_SU(); #defaulted
39 my $outbound_directory = $Project->DATA_SEISMIC_SU(); #defaulted
40 my $superflow_config_names = $get->superflow_config_names_aref();
41  
42 # WARNING---- watch out for missing underscore!!
43 # print("1. BackupProject_config,superflow_config_name : $$superflow_config_names[13]\n");
44  
45 =head2 private hash
46  
47 =cut
48  
49 my $BackupProject_config = {
50 _prog_name => '',
51 _values_aref => '',
52 };
53  
54 # set the superflow name: 13 is for BackupProject
55  
56 sub get_values {
57 my ($self) = @_;
58  
59 # Warning: set using a scalar reference
60 $BackupProject_config->{_prog_name} = \@{$superflow_config_names}[13];
61  
62 # print("BackupProject_config, prog_name : @{$superflow_config_names}[13]\n");
63  
64 $config_superflows->set_program_name( $BackupProject_config->{_prog_name} );
65  
66 # parameter values from superflow configuration file
67 $BackupProject_config->{_values_aref} = $config_superflows->get_values();
68  
69 # print("BackupProject_config,values=@{$BackupProject_config->{_values_aref}}\n");
70  
71 my $directory_name = @{ $BackupProject_config->{_values_aref} }[0];
72
73
74 =head2 Example LOCAL VARIABLES FOR THIS PROJECT
75  
76 =cut
77
78 my $CFG = {
79 BackupProject => {
80 1 => {
81 directory_name => $directory_name,
82 }
83 }
84 }; # end of CFG hash
85  
86 return ( $CFG, $BackupProject_config->{_values_aref} ); # hash and arrary reference
87  
88 }; # end of sub get_values
89  
90  
91 =head2 sub get_max_index
92  
93 max index = number of input variables -1
94  
95 =cut
96  
97 sub get_max_index {
98 my ($self) = @_;
99  
100 my $max_index = 0;
101  
102 return ($max_index);
103 }
104  
105 1;