Changeset 341 for obsdata/trunk
- Timestamp:
- 03/26/14 05:07:44 (10 years ago)
- Location:
- obsdata/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
obsdata/trunk/ObsData.pm
r338 r341 14 14 my @loglevel = ( 'DEBUG', 'INFO', 'RESULT', 'WARNING', 'ERROR', 'FATAL', ); 15 15 16 our $VERSION = "0.3. 4";16 our $VERSION = "0.3.3"; 17 17 our $CVSID = q$Id$; 18 18 our $CVSREV = ( q$Revision$ =~ /^Revision: (.*) $/ )[0]; -
obsdata/trunk/ObsData/Repository/Status.pm
r336 r341 4 4 use warnings; 5 5 6 use YAML ;6 use YAML::Syck; 7 7 use Config::IniFiles; 8 8 … … 16 16 17 17 if ($self->{file} && -r $self->{file}) { 18 $self->{data} = YAML:: LoadFile($self->{file});18 $self->{data} = YAML::Syck::LoadFile($self->{file}); 19 19 } 20 20 … … 27 27 my ($self, $output) = @_; 28 28 29 YAML::DumpFile($output, $self->{data}); 29 if (open(my $handle, '>', $output . '.new')) { 30 print $handle YAML::Syck::Dump($self->{data}) or return; 31 close($handle); 32 unlink($output) or die "Can't unlink old file"; 33 rename($output . '.new', $output); 34 } else { 35 die "Can't open $output for wirting\n"; 36 } 30 37 } 31 38
Note: See TracChangeset
for help on using the changeset viewer.