Skip Menu |

This queue is for tickets about the SelfLoader CPAN distribution.

Report information
The Basics
Id: 129634
Status: new
Priority: 0/
Queue: SelfLoader

People
Owner: Nobody in particular
Requestors: umallem [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Can't locate object method "untaint" via package "FileHandle" at /opt/lib/perl5/5.10.1/SelfLoader.pm
From: umallem [...] gmail.com
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";