[interchange-cvs] interchange - jon modified lib/Vend/Config.pm
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Fri Aug 19 22:53:46 EDT 2005
User: jon
Date: 2005-08-20 02:53:45 GMT
Modified: lib/Vend Config.pm
Log:
Switch to using non-qualified sub names where they're imported into this
namespace, especially in calls to Vend::Util where subs have actually
moved to Vend::File.
Revision Changes Path
2.183 +13 -13 interchange/lib/Vend/Config.pm
rev 2.183, prev_rev 2.182
Index: Config.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Config.pm,v
retrieving revision 2.182
retrieving revision 2.183
diff -u -u -r2.182 -r2.183
--- Config.pm 19 Aug 2005 06:29:11 -0000 2.182
+++ Config.pm 20 Aug 2005 02:53:45 -0000 2.183
@@ -1,6 +1,6 @@
# Vend::Config - Configure Interchange
#
-# $Id: Config.pm,v 2.182 2005/08/19 06:29:11 jon Exp $
+# $Id: Config.pm,v 2.183 2005/08/20 02:53:45 jon Exp $
#
# Copyright (C) 2002-2003 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
@@ -52,7 +52,7 @@
use Vend::Data;
use Vend::Cron;
-$VERSION = substr(q$Revision: 2.182 $, 10);
+$VERSION = substr(q$Revision: 2.183 $, 10);
my %CDname;
my %CPname;
@@ -866,7 +866,7 @@
if($init and ref($routine) eq 'CODE') {
## Attempt to initialize
- $init = Vend::Util::get_option_hash($init);
+ $init = get_option_hash($init);
$routine->($init);
}
@@ -1495,8 +1495,8 @@
delete $c->{Source};
my $stime = scalar localtime();
- Vend::Util::writefile(">$Global::RunDir/status.$g->{name}", "$stime\n$g->{dir}\n");
- Vend::Util::writefile(">$c->{ConfDir}/status.$g->{name}", "$stime\n");
+ writefile(">$Global::RunDir/status.$g->{name}", "$stime\n$g->{dir}\n");
+ writefile(">$c->{ConfDir}/status.$g->{name}", "$stime\n");
return $c;
@@ -2742,10 +2742,10 @@
if (! $Global::VarName) {
unless (-s "$Global::ConfDir/varnames" && -r _) {
$settings = $Varnames . "\n$settings";
- Vend::Util::writefile("$Global::ConfDir/varnames", $Varnames);
+ writefile("$Global::ConfDir/varnames", $Varnames);
}
else {
- $settings = Vend::Util::readfile("$Global::ConfDir/varnames");
+ $settings = readfile("$Global::ConfDir/varnames");
}
}
undef $Varnames;
@@ -3049,7 +3049,7 @@
$c = ${"Global::$item"} || {};
}
- return Vend::Util::hash_string($settings,$c);
+ return hash_string($settings,$c);
}
# Set up illegal values for certain directives
@@ -3658,7 +3658,7 @@
my($var, $value) = @_;
return '' unless $value;
$value = "$Global::VendRoot/$value"
- unless Vend::Util::file_name_is_absolute($value);
+ unless file_name_is_absolute($value);
$value =~ s./+$..;
return $value;
}
@@ -3674,7 +3674,7 @@
foreach my $dir (@dirs) {
$dir = "$Global::VendRoot/$dir"
- unless Vend::Util::file_name_is_absolute($dir);
+ unless file_name_is_absolute($dir);
$dir =~ s./+$..;
push @$c, $dir;
}
@@ -3685,7 +3685,7 @@
my($var, $value) = @_;
return [] unless $value;
$value = "$C->{VendRoot}/$value"
- unless Vend::Util::file_name_is_absolute($value);
+ unless file_name_is_absolute($value);
$value =~ s./+$..;
$C->{$var} = [] unless $C->{$var};
my $c = $C->{$var} || [];
@@ -3702,7 +3702,7 @@
config_error(
"No leading / allowed if NoAbsolute set. Contact administrator.\n"
)
- if Vend::Util::file_name_is_absolute($value) and $Global::NoAbsolute;
+ if file_name_is_absolute($value) and $Global::NoAbsolute;
config_error(
"No leading ../.. allowed if NoAbsolute set. Contact administrator.\n"
)
@@ -3711,7 +3711,7 @@
$C->{Source}{$var} = $value;
$value = "$C->{VendRoot}/$value"
- unless Vend::Util::file_name_is_absolute($value);
+ unless file_name_is_absolute($value);
$value =~ s./+$..;
$value;
}
More information about the interchange-cvs
mailing list