On Tue May 21 12:25:49 2019, umallem@gmail.com wrote:
Show quoted text> This transaction appears to have no content
Hello there,
We are trying to process XML files. One of custom module is using SelfLoader.pm. It is failing with below error
Can't locate object method "untaint" via package "FileHandle"
$fh->untaint().
Request to please help us if you anyone has ran into this issue.
SelfLoader.pm _load_stubs subroutine that is causing issue.
sub _load_stubs {
# $endlines is used by Devel::SelfStubber to capture lines after __END__
my($self, $callpack, $endlines) = @_;
no strict "refs";
my $fh = \*{"${callpack}::DATA"};
use strict;
my $currpack = $callpack;
my($line,$name,@lines, @stubs, $protoype);
print STDERR "SelfLoader::load_stubs($callpack)\n" if DEBUG;
croak("$callpack doesn't contain an __DATA__ token")
unless defined fileno($fh);
# Protect: fork() shares the file pointer between the parent and the kid
if(sysseek($fh, tell($fh), 0)) {
open my $nfh, '<&', $fh or croak "reopen: $!";# dup() the fd
close $fh or die "close: $!"; # autocloses, but be paranoid
open $fh, '<&', $nfh or croak "reopen2: $!"; # dup() the fd "back"
close $nfh or die "close after reopen: $!"; # autocloses, but be paranoid
$fh->untaint;
}
$Cache{"${currpack}::<DATA"} = 1; # indicate package is cached
local($/) = "\n";