[interchange-cvs] interchange - kwalsh modified lib/Vend/Config.pm
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Thu Aug 9 05:42:47 EDT 2007
User: kwalsh
Date: 2007-08-09 09:42:47 GMT
Modified: lib/Vend Config.pm
Log:
* Make "Require usertag" check both the local and global UserTag
space when used in a local (catalog.cfg) context.
Revision Changes Path
2.220 +15 -3 interchange/lib/Vend/Config.pm
rev 2.220, prev_rev 2.219
Index: Config.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Config.pm,v
retrieving revision 2.219
retrieving revision 2.220
diff -u -r2.219 -r2.220
--- Config.pm 9 Aug 2007 07:32:44 -0000 2.219
+++ Config.pm 9 Aug 2007 09:42:46 -0000 2.220
@@ -1,6 +1,6 @@
# Vend::Config - Configure Interchange
#
-# $Id: Config.pm,v 2.219 2007/08/09 07:32:44 kwalsh Exp $
+# $Id: Config.pm,v 2.220 2007/08/09 09:42:46 kwalsh Exp $
#
# Copyright (C) 2002-2007 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
@@ -54,7 +54,7 @@
use Vend::Data;
use Vend::Cron;
-$VERSION = substr(q$Revision: 2.219 $, 10);
+$VERSION = substr(q$Revision: 2.220 $, 10);
my %CDname;
my %CPname;
@@ -2688,8 +2688,20 @@
$val = join " ", @needed;
}
elsif($val =~ s/^usertag\s+//i) {
- $require = $Global::UserTag->{Routine};
+ $require = {};
$name = 'UserTag';
+
+ $testsub = sub {
+ my $name = shift;
+
+ my @tries = ($Global::UserTag->{Routine});
+ push(@tries,$C->{UserTag}->{Routine}) if $C;
+
+ foreach (@tries) {
+ return 1 if defined $_->{$name};
+ }
+ return 0;
+ };
}
elsif($val =~ s/^(?:perl)?module\s+//i) {
$require = {};
More information about the interchange-cvs
mailing list