« lib/App/SeismicUnixGui/misc/oop_run_flows.pm
↑ Summary
lib/App/SeismicUnixGui/misc/perl_declare.pm »
| 1 | package App::SeismicUnixGui::misc::oop_use_pkg; | ||
| 2 | use Moose; | ||
| 3 | our $VERSION = '0.0.1'; | ||
| 4 | |||
| 5 | |||
| 6 | =head1 SYNOPSIS | ||
| 7 | |||
| 8 | This module constructs a list of `use` statements with relevant package imports | ||
| 9 | and assigns project data paths through the `Project_config` object. | ||
| 10 | |||
| 11 | Default perl lines for start of instantiation | ||
| 12 | of imported packages | ||
| 13 | |||
| 14 | =cut | ||
| 15 | |||
| 16 | sub section { | ||
| 17 | |||
| 18 | my ($self) = @_; | ||
| 19 | # Create the @use array directly with the required use statements and project data | ||
| 20 | |||
| 21 | my @use; | ||
| 22 | $use[0] = "\t" . 'use Moose;' . "\n"; | ||
| 23 | $use[1] = "\t" . 'use App::SeismicUnixGui::misc::SeismicUnix qw($in $out $on $go $to $suffix_ascii $off $suffix_segd $suffix_segy $suffix_sgy $suffix_su $suffix_segd $suffix_txt $suffix_bin);' . "\n"; | ||
| 24 | $use[2] = "\t" . 'use aliased \'App::SeismicUnixGui::configs::big_streams::Project_config\';' . "\n\n"; | ||
| 25 | $use[3] = "\t" . 'my $Project' . "\t\t" . ' = Project_config->new();' . "\n"; | ||
| 26 | $use[4] = "\t" . 'my $DATA_SEISMIC_BIN' . "\t". '= $Project->DATA_SEISMIC_BIN();' . "\n"; | ||
| 27 | $use[5] = "\t" . 'my $DATA_SEISMIC_SEGD' . "\t" . '= $Project->DATA_SEISMIC_SEGD();' . "\n"; | ||
| 28 | $use[6] = "\t" . 'my $DATA_SEISMIC_SEGY' . "\t" . '= $Project->DATA_SEISMIC_SEGY();' . "\n"; | ||
| 29 | $use[7] = "\t" . 'my $DATA_SEISMIC_SU' . "\t" . ' = $Project->DATA_SEISMIC_SU();' . "\n"; | ||
| 30 | $use[8] = "\t" . 'my $DATA_SEISMIC_TXT' . "\t" . '= $Project->DATA_SEISMIC_TXT();' . "\n"; | ||
| 31 | $use[9] = "\t" . 'my $PL_SEISMIC' . "\t" . ' = $Project->PL_SEISMIC();' . "\n\n"; | ||
| 32 | $use[10] = "\t" . 'use aliased \'App::SeismicUnixGui::misc::message\';'."\n"; | ||
| 33 | $use[11] = "\t" . 'use aliased \'App::SeismicUnixGui::misc::flow\';' . "\n"; | ||
| 34 | |||
| 35 | |||
| 36 | return \@use; | ||
| 37 | } | ||
| 38 | |||
| 39 | 1; |