/usr/share/perl5/XML/Stream/Tools.pm is in libxml-stream-perl 1.24-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | package XML::Stream::Tools;
use strict;
use warnings;
use FileHandle;
# helper function (not a method!)
sub setup_debug {
my ($self, %args) = @_;
$self->{DEBUGTIME} = 0;
$self->{DEBUGTIME} = $args{debugtime} if exists($args{debugtime});
$self->{DEBUGLEVEL} = 0;
$self->{DEBUGLEVEL} = $args{debuglevel} if exists($args{debuglevel});
$self->{DEBUGFILE} = "";
$args{debugfh} ||= '';
$args{debug} ||= '';
if ($args{debugfh} ne "")
{
$self->{DEBUGFILE} = $args{debugfh};
$self->{DEBUG} = 1;
}
elsif ($args{debug} ne "")
{
$self->{DEBUG} = 1;
if (lc($args{debug}) eq "stdout")
{
$self->{DEBUGFILE} = FileHandle->new(">&STDERR");
$self->{DEBUGFILE}->autoflush(1);
}
else
{
if (-e $args{debug})
{
if (-w $args{debug})
{
$self->{DEBUGFILE} = FileHandle->new(">$args{debug}");
$self->{DEBUGFILE}->autoflush(1);
}
else
{
print "WARNING: debug file ($args{debug}) is not writable by you\n";
print " No debug information being saved.\n";
$self->{DEBUG} = 0;
}
}
else
{
$self->{DEBUGFILE} = FileHandle->new(">$args{debug}");
if (defined($self->{DEBUGFILE}))
{
$self->{DEBUGFILE}->autoflush(1);
}
else
{
print "WARNING: debug file ($args{debug}) does not exist \n";
print " and is not writable by you.\n";
print " No debug information being saved.\n";
$self->{DEBUG} = 0;
}
}
}
}
}
1;
|