DOCUMENTATION

SYNOPSIS

PERL PROGRAM NAME: sunix_pl 
AUTHOR: 	Juan Lorenzo
DATE: 		June 22 2017 
			Oct 1 2018 V0.0.2

DESCRIPTION  Parse perl scripts written by L_SU
    

BASED ON:

USE

NOTES

Examples

CHANGES and their DATES

	V0.0.2 
		10.1.2018 
		gaps and non-standard characters in a string are allowable e.g. windowtitle='Strange units (m/Pa)

 

instantiate modules

declasre variables

initialize shared anonymous hash

key/value pairs

_good_sunix_params

extract labels and parameter values 
for each program

sub declare

sub flows

get_all_labels

get all active and default 
parameter names from a program in a perl flow

sub get_error_messages

sub get_lines_progs_contain

return line numbers that contain a particular
word or string 

sub get_lines_progs_end_with

return line numbers that contain a particular
word or string 
  print("progs_end_with,@{$sunix_pl->{_end_prog_lines}}\n");i
  print("progs_end_with,@{$sunix_pl->{_end_line_contents}}\n");

sub get_lines_progs_start_with

return line numbers that contain a particular
word or string 
 print("$case_num cases in $count_all_lines lines,\n");  
 print("at line(s): @{$sunix_pl->{_line_nums}}\n");  
 print("progs_start_with, length is $size\n"); 
 print ("word is $word\n");
 print ("word is $string\n");

sub get_num_good_progs

get_good_sunix_params should have been run first

sub get_num_progs

get_all_labels

return all active and default 
parameter labels from a program in a perl flow

get_all_values

return all active and default 
parameter values from a program in a perl flow

sub get_all_sunix_names

   foreach my $keys (sort keys %$psunix) {
     print("keys $keys value @{$sunix_pl->{$keys}}[1]\n");
   }
   this subroutine needs file read by sub lines_with 
     print ("i: $i fields are: @{$hash_ref->{_line_contents}}[$i] \n");
	print("self is $self hash ref is $hash_ref\n");

sub get_all_versions

sub get_good_sunix_names

only those sunix programs
that have useful parameter
values and labels

MUST run get_good_sunix_params first (externally called)
to have 
$good_prog_indices_ref

get_good_sunix_params

From a file containing a perl-scripted flow,
extract labels and parameter values 
for each program

10-1-2018 sunix text sequences are now allowable gaps via quotemeta
10-5-2018 sunix text sequences can have suffixes and prefixes to the value as well
11-25-2018 account for programs with NULL parameters, e.g. suspecfx

sub get_good_sunix_namessions

get the complete file
line by line
import standard perl
headers 
and write to output file

sub instantiation

sub lines_with

return line numbers that contain a particular
word or string 

sub logs

sub run

sub set_file_in

sub set_file_in_sref

print("set_file_in is $sunix_pl->{_file_in}\n");

sub set_file_out

print("set_file_out is $sunix_pl->{_file_out}\n");

sub set_good_labels

enter only those active
parameter values from a program in a perl flow

sub set_good_values

enter only those active
parameter values from a program in a perl flow

sub set_num_progs

sub set_path_in_ref

sub set_perl_file_in

sub set_perl_path

 working file name
	

sub set_perl_path_in

 working file name
	

sub set_progs_contain

return line numbers that contain a particular
word or string 

sub set_progs_end_with

return line numbers that contain a particular
word or string 
  print("progs_end_with,@{$sunix_pl->{_end_prog_lines}}\n");i
  print("progs_end_with,@{$sunix_pl->{_end_line_contents}}\n");

sub set_progs_start_with

return line numbers that contain a particular
word or string 
 print("$case_num cases in $count_all_lines lines,\n");  
 print("at line(s): @{$sunix_pl->{_line_nums}}\n");  
 print("set_progs_start_with, length is $size\n"); 
 print ("word is $word\n");
 print ("word is $string\n");

sub use_pkg

open and read
the complete file
line by line
   #print ("lines are @{$sunix_pl->{_all_lines_aref}}\n"); 
   print ("We seem to have $sunix_pl->{_num_lines} lines total\n");

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 331:

=pod directives shouldn't be over one line long! Ignoring all 4 lines of content

Around line 586:

=cut found outside a pod block. Skipping to next block.