/usr/share/perl5/XML/SAX/Debian.pm is in libxml-sax-perl 0.99+dfsg-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 | package XML::SAX::Debian;
use strict;
use warnings;
use base "XML::SAX";
use File::Spec ();
sub save_parsers_debian {
my $class = shift;
my ($parser_module,$directory, $priority) = @_;
# add parser
{
# We do not want load_parsers to complain.
local $ENV{HARNESS_ACTIVE} = 1;
$class->load_parsers("/nonexistent");
}
$class->add_parser($parser_module);
# get parser's ParserDetails file
my $file = $parser_module;
$file = "${priority}-$file" if $priority != 0;
$file = File::Spec->catfile($directory, $file);
chmod 0644, $file;
unlink($file);
open(my $fh, ">$file") ||
die "Cannot write to $file: $!";
foreach my $p (@{ $class->parsers }) {
print $fh "[$p->{Name}]\n";
foreach my $key (keys %{$p->{Features}}) {
print $fh "$key = $p->{Features}{$key}\n";
}
print $fh "\n";
}
print $fh "\n";
close $fh;
return $class;
}
1;
|