SYNOPSIS
PERL PROGRAM NAME: change_a_line_everywhere
AUTHOR:
DATE: V 0.1 Jun 15 2022
DESCRIPTION: replace Perl directory structure within all files
Version: 0.1 0.2 use search_directories.pm instead of L_SU_global_variables.pm 0.3 use dirs.pm instead of search_directories.pm 0.4 update PARENT_DIR and CHILD_DIR assignments to conform with the new dirs.pm (V0.3) 10.25.23
USE
NOTES
The is a grandparent:parent:child relationship for two of the sets of directories
but only a grandparent:parent relationship for the remaining third directory set.
Based on change_a_line V0.1
Examples
SYNOPSIS
Look at every file with a .pm and .pl extension Requires looking at all files within the following categories (See search_directories) SU, GEN, SPECS, GUI, TOOLS
1. for each of 4 categories get CATEGORY[ABS_PATHs][FILmy $line2find_use = '\s*use\s';E_NAMEs] = 'full path and file name' (from search_directories)
2. Search every file for the lines of interest (loi) CATEGORY_lines_of_interest[ABS_PATHs][FILE_NAMES] = array_ref e.g.: lines 1 and 2 slurp file test every line write loi to array
3. For each CATEGORY[ABS_PATHs][FILE_NAMEs],look at loi slurp file again
Review conditions
Replace the line with proper hierarchy
relative_path::file_name
Add other special lines
replace old with new file
CHANGES and their DATES
Important definitions
Important definitions
of directory structure. Local development!
privately shared hash
Get all the files and their paths
from the SU category
search for lines of interest
in SU-type files and replace them
Get all the files and their full paths
from the GEN category and replace them(
search for lines of interest
in GEN-type files and replace them
Get all the files and their full paths
from the SPECS category
search for lines of interest
in SPECS-type files and replace them
Get all the files and their full paths
from the GUI category
search for lines of interest
in GUI-type files and replace them
Get all the files and their full paths
from the TOOLS category
search for lines of interest
in TOOLS-type files and replace them
_get_line_of_interest_aref
sub _set_child_directory_number_of
sub _set_line_of_interest_aref
sub _set_parent_directory_number_of
sub _set_pathNfile_aref
_set_replacement_type7
include a new line of interest