r9852 - /trunk/libxml-sax-perl/SAX.pm
ntyni-guest at users.alioth.debian.org
ntyni-guest at users.alioth.debian.org
Tue Nov 27 19:00:35 UTC 2007
Author: ntyni-guest
Date: Tue Nov 27 19:00:35 2007
New Revision: 9852
URL: http://svn.debian.org/wsvn/?sc=1&rev=9852
Log:
minimize the Debian diff to SAX.pm with an early return instead of commenting out code
Modified:
trunk/libxml-sax-perl/SAX.pm
Modified: trunk/libxml-sax-perl/SAX.pm
URL: http://svn.debian.org/wsvn/trunk/libxml-sax-perl/SAX.pm?rev=9852&op=diff
==============================================================================
--- trunk/libxml-sax-perl/SAX.pm (original)
+++ trunk/libxml-sax-perl/SAX.pm Tue Nov 27 19:00:35 2007
@@ -52,8 +52,8 @@
# reset parsers
$known_parsers = [];
+ # get directory from wherever XML::SAX is installed
if (!$dir) {
- # get directory from wherever XML::SAX is installed
$dir = $INC{'XML/SAX.pm'};
$dir = File::Spec->catfile(dirname($dir), "SAX");
}
@@ -185,34 +185,38 @@
sub save_parsers {
my $class = shift;
- # get directory from wherever XML::SAX is installed
- #my $dir = $INC{'XML/SAX.pm'};
- #$dir = dirname($dir);
-
- #my $file = File::Spec->catfile($dir, "SAX", PARSER_DETAILS);
- #chmod 0644, $file;
- #unlink($file);
-
- #my $fh = gensym();
- #open($fh, ">$file") ||
- # die "Cannot write to $file: $!";
-
- #foreach my $p (@$known_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;
-
+ ### DEBIAN MODIFICATION
print "\n";
print "Please use 'update-perl-sax-parsers(8) to register this parser.'\n";
print "See /usr/share/doc/libxml-sax-perl/README.Debian.gz for more info.\n";
print "\n";
+
+ return $class; # rest of the function is disabled on Debian.
+ ### END DEBIAN MODIFICATION
+
+ # get directory from wherever XML::SAX is installed
+ my $dir = $INC{'XML/SAX.pm'};
+ $dir = dirname($dir);
+
+ my $file = File::Spec->catfile($dir, "SAX", PARSER_DETAILS);
+ chmod 0644, $file;
+ unlink($file);
+
+ my $fh = gensym();
+ open($fh, ">$file") ||
+ die "Cannot write to $file: $!";
+
+ foreach my $p (@$known_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;
}
More information about the Pkg-perl-cvs-commits
mailing list