When untainting variables in Perl does all the untainting have to be done locally to the Perl (.pl) file or can it be passed through a Perl Module (.pm) to untaint?
For example, untainting may look something like this:
$string =~ /\A(.*)\z/s
(obviously it is a bad practice to blanket match-anything an input, this is just showing an example)
I'm wondering is it possible to pass it through a .pm since I want to execute against the same regex expression in multiple .pl files.
use myModule;
$string = myModule::myUntaint($string);
Where "myUntaint" is a subroutine within the .pm "myModule" that contains my regex.