/[cvs]/nfo/perl/scripts/umltools/ConfigPatcher/Main.pm
ViewVC logotype

Contents of /nfo/perl/scripts/umltools/ConfigPatcher/Main.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (vendor branch)
Tue Oct 22 02:25:56 2002 UTC (21 years, 6 months ago) by joko
Branch: nfo, MAIN
CVS Tags: v000, HEAD
Changes since 1.1: +0 -0 lines
+ initial import


1 package ConfigPatcher::Main;
2
3 require Exporter;
4 @ISA = qw(Exporter);
5
6 @EXPORT = qw(preparePatches);
7
8 use strict;
9 use warnings;
10
11 my %vhost;
12
13 use ConfigPatcher::Config;
14 use ConfigPatcher::Handlers;
15
16 sub preparePatches {
17 my $patchfile = shift;
18 my $patchTarget = shift;
19 ConfigPatcher::Config::readConfig($patchfile);
20 my %cfg_patcher = %ConfigPatcher::Config::cfg_patcher;
21
22 my @files = keys %cfg_patcher;
23 foreach my $file (@files) {
24 my $handler = $cfg_patcher{$file};
25 my $pt = $patchTarget . $file;
26 print "\n", "patching file \"$pt\" ...";
27 #print "patching file by ";
28 my $eval = "ConfigPatcher::Handlers::$handler('$pt');";
29 #print "executing handler $eval ...";
30 my $res = eval($eval);
31 # error in eval?
32 if ($@ || !$res) {
33 print "failed: $@";
34 } else {
35 print "ok";
36 }
37 }
38
39 }
40
41 1;
42

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed