summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Merge.pm
diff options
context:
space:
mode:
authorfukachan <fukachan>2004-11-25 12:21:39 +0000
committerfukachan <fukachan>2004-11-25 12:21:39 +0000
commitcf2c9f5e16d3afd4fadbf80669bedad9e15ef84c (patch)
tree2a50921e0c665c8f3c019a10b48a57c526d78884 /fml/lib/FML/Merge.pm
parent6523f593569f25768d0de60bfa1270ba5ddbf621 (diff)
downloadfml8-cf2c9f5e16d3afd4fadbf80669bedad9e15ef84c.tar.gz
fml8-cf2c9f5e16d3afd4fadbf80669bedad9e15ef84c.tar.bz2
fml8-cf2c9f5e16d3afd4fadbf80669bedad9e15ef84c.zip
speculate_default_config_ph_path() returns specified location of
default_config.ph if /usr/local/fml/default_config.ph not found.
Diffstat (limited to 'fml/lib/FML/Merge.pm')
-rw-r--r--fml/lib/FML/Merge.pm14
1 files changed, 12 insertions, 2 deletions
diff --git a/fml/lib/FML/Merge.pm b/fml/lib/FML/Merge.pm
index bebf0ee4..f6142fe3 100644
--- a/fml/lib/FML/Merge.pm
+++ b/fml/lib/FML/Merge.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: Merge.pm,v 1.11 2004/07/23 15:59:00 fukachan Exp $
+# $FML: Merge.pm,v 1.12 2004/09/06 07:05:34 fukachan Exp $
#
package FML::Merge;
@@ -307,6 +307,7 @@ sub merge_into_config_cf
sub speculate_default_config_ph_path
{
my ($self) = @_;
+ my $curproc = $self->{ _curproc };
my $m_config = $self->{ _m_config };
my $old_include_path = $m_config->old_file_path("include");
my $bak_include_path = $m_config->backup_file_path("include");
@@ -346,7 +347,16 @@ sub speculate_default_config_ph_path
return $file;
}
else {
- croak("default_config.ph path undefined.");
+ my $config = $curproc->config();
+ my $file = $config->{ compat_old_fml_default_config_ph_file };
+ $curproc->log("check $file");
+ if (-f $file) {
+ print STDERR " using $file as default_config.ph\n";
+ return $file;
+ }
+ else {
+ croak("default_config.ph path undefined.");
+ }
}
}