- Timestamp:
- 10/07/05 03:50:45 (3 years ago)
- Files:
-
- 1 modified
-
inc/PugsBuild/Config.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
inc/PugsBuild/Config.pm
r7367 r7369 47 47 die "copy: $!"; 48 48 warn <<"."; 49 *** 50 Default build config file created. Edit your settings in $filename. 49 *** Default build config file created. Edit your settings in $filename. 51 50 . 52 51 } 53 54 if (-M $filename > -M $config_template) {55 warn <<".";56 ***57 Build config file '$filename' is older than template58 '$config_template'.59 60 You may wish to check for new settings.61 .62 }63 52 64 53 open my $fh, $filename or die "open: $filename: $!"; 65 54 { local $/; $stream = <$fh> } 66 55 my $conf = $YAML->load($stream); 56 57 if (-M $filename > -M $config_template) { 58 warn <<"."; 59 *** Build config file '$filename' is older than template 60 '$config_template'. I will merge them for you, but 61 you may wish to check for new settings. 62 63 . 64 open my $tpl, $config_template or die "open: $config_template: $!"; 65 my $tpl_stream = do { local $/; <$tpl> }; 66 my $tpl_config = $YAML->load($stream); 67 $conf = { %$tpl_config, %$conf }; 68 } 69 67 70 $class->env_override($conf); 68 69 71 $class->defaults($conf); 70 72 return $conf;
