Changeset 50 for trunk


Ignore:
Timestamp:
11/24/05 08:10:37 (19 years ago)
Author:
thauvin
Message:
  • write status file function
  • fix ObsData::Repository new()
Location:
trunk/soft/ObsData
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/soft/ObsData/ObsData.pm

    • Property cvs2svn:cvs-rev changed from 1.13 to 1.14
    r49 r50  
    2020 
    2121our $VERSION = 0.01; 
     22our $CVSID = q$Id$; 
    2223 
    2324=head1 NAME 
     
    5051        logcallback => $options{logcallback}, 
    5152        dir => $options{dir}, 
    52  
    5353    }; 
    5454 
  • trunk/soft/ObsData/ObsData/Repository.pm

    • Property cvs2svn:cvs-rev changed from 1.4 to 1.5
    r48 r50  
    77use ObsData; 
    88use Config::IniFiles; 
     9 
     10our $CVSID = q$Id$; 
    911 
    1012=head1 METHODS 
     
    2426    my $OR = { 
    2527        obsdata => $obsdata, 
    26         status => undef, 
     28        status => new Config::IniFiles( 
     29            -file => (-f $dir . "/obsdata.ini" ? ($dir . "/obsdata.ini") : undef), 
     30            # -default => '.', # Is this a good idea 
     31        ), 
    2732        dir => $dir, 
    2833    }; 
    2934 
     35 
     36     
    3037    foreach my $inf (qw(obs datatype)) { 
    3138        $OR->{$inf} = $info{$inf}; 
    3239    } 
    3340 
    34     bless($obsdata, $class); 
     41    bless($OR, $class); 
    3542} 
    3643 
     
    4249sub save_status { 
    4350    my ($self) = @_; 
     51    $self->{status}->AddSection('.'); 
     52    $self->{status}->SetSectionComment('.', 
     53        $ObsData::CVSID, 
     54        $ObsData::Repository::CVSID, 
     55        scalar(localtime), 
     56    ); 
     57 
     58    $self->{status}->WriteConfig("$self->{dir}/obsdata.ini"); 
    4459} 
    4560 
Note: See TracChangeset for help on using the changeset viewer.