No subject


Wed Jul 30 17:08:51 UTC 2008


catfile Concatenate one or more directory names and a filename to form
        a complete path ending with a filename

I am attaching a fully untested quick and dirty patch, intending to get rid
of File::Spec::Functions by replacing 'catfile' calls. 

Hope this helps,

-- 
Agustin

--cWoXeonUoKmBZSoM
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="update-xmlcatalog.deprecate_functions.diff"

--- update-xmlcatalog.orig	2008-10-08 00:20:48.000000000 +0200
+++ update-xmlcatalog	2008-10-08 00:33:57.000000000 +0200
@@ -121,7 +121,6 @@
 use strict;
 
 ## ----------------------------------------------------------------------
-use File::Spec::Functions;
 use Getopt::Long;
 
 ## ----------------------------------------------------------------------
@@ -196,7 +195,7 @@
     {
 	if ( defined( $package ) )
 	{
-	    my $catalog = catfile( $catalog_dir, "$package.xml" );
+	    my $catalog = $catalog_dir . "/$package.xml";
 	    if ( ! -f $catalog )
 	    {
 		print STDERR "$name: error: package catalog $catalog not found\n";
@@ -261,7 +260,7 @@
 {
     if ( defined( $root ) )
     {
-	my $catalog = catfile( $catalog_dir, 'catalog' );
+	my $catalog = "$catalog_dir/catalog";
 	if ( ! -f $catalog )
 	{
 	    print STDERR "$name: error: root catalog $catalog not found\n";
@@ -275,7 +274,7 @@
     }
     elsif ( defined( $package ) )
     {
-	my $catalog = catfile( $catalog_dir, "$package.xml" );
+	my $catalog = "$catalog_dir/$package.xml";
 	if ( ! -f $catalog )
 	{
 	    print STDERR "$name: error: package catalog $catalog not found\n";
@@ -344,8 +343,8 @@
 if ( defined( $root ) )
 {
     $catalog = 'catalog';
-    $catalog_data = catfile( $catalog_data_dir, $catalog );
-    $catalog = catfile( $catalog_dir, $catalog );
+    $catalog_data = "$catalog_data_dir" . "/" . "$catalog";
+    $catalog      = "$catalog_dir"      . "/" . "$catalog";
     my $start = $type;
     $start .= 'Id' unless $type eq 'uri';
     $start .= 'StartString';
@@ -358,8 +357,8 @@
 }
 elsif ( defined( $package ) )
 {
-    $catalog_data = catfile( $catalog_data_dir, $package );
-    $catalog = catfile( $catalog_dir, "$package.xml" );
+    $catalog_data = $catalog_data_dir . "/" . $package;
+    $catalog      = $catalog_dir      . "/" . "$package.xml";
     my $start = $type;
     $start .= 'Id' unless $type eq 'uri';
     $start .= 'StartString';
@@ -375,7 +374,7 @@
     $catalog = $local;
     $catalog_data = $local;
     $catalog_data =~ tr|/|_|;
-    $catalog_data = catfile( $catalog_data_dir, $catalog_data );
+    $catalog_data = $catalog_data_dir  . "/" . $catalog_data;
     my $start = ( $type eq 'uri' ) ? 'name' : $type;
     $start .= 'Id' unless $type eq 'uri';
     $id = "$start=\"$id\"";

--cWoXeonUoKmBZSoM--





More information about the debian-xml-sgml-pkgs mailing list