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
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_type1
replace line of interest
set_replacement_type2
replace line of interest
set_replacement_type3
replace line of interest
set_replacement_type4
replace line of interest
set_replacement_type5
replace line of interest
_set_replacement_type6
include a new line of interest