- Timestamp:
- 07/22/05 19:08:32 (3 years ago)
- svk:copy_cache_prev:
- 7758
- Files:
-
- 1 modified
-
inc/PugsBuild/Config.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
inc/PugsBuild/Config.pm
r5755 r5756 37 37 my($class, $filename) = @_; 38 38 my $stream; 39 my $fh;40 39 41 unless (open $fh, ($filename ||= "config.yml")) { 42 if (-e $filename) { die "open: $!"; } # real error 43 44 # Makefile.PL uses PugsBuild::Config, which needs to read config.yml. 45 # However, config.yml is generated by a Makefile target. 46 # This whole block is a temporary workaround for the problem. 40 if (!-e ($filename ||= "config.yml")) { 47 41 require File::Copy; 48 49 File::Copy::copy ('util/config-template.yml', 'config.yml') or die "Copy failed"; 50 warn "Default build config file created. Edit your settings in config.yml."; 51 52 open $fh, "config.yml" or die "open: $!"; 53 }; 54 42 File::Copy::copy ('util/config-template.yml', $filename) or 43 die "copy: $!"; 44 warn <<"."; 45 Default build config file created. Edit your settings in $filename. 46 . 47 } 48 49 open my $fh, $filename or die "open: $filename: $!"; 55 50 { local $/; $stream = <$fh> } 56 51 my $conf = $YAML->load($stream);
