Changeset 138
- Timestamp:
- 12/13/05 21:52:21 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/soft/ObsData/ObsData/Repository.pm
- Property cvs2svn:cvs-rev changed from 1.46 to 1.47
r128 r138 18 18 =head2 ObsData::Repository 19 19 20 =head3 new 20 =head3 new($parent, %param) 21 21 22 22 Create a new ObsData::Repository object 23 23 24 =over 4 25 26 =item $parent 27 28 A ObsData::Repository to take information 29 30 =item %param 31 32 A list of paramter to set in new object: 33 34 =over 4 35 36 =item datatype 37 38 If set, only this datatype will be checked 39 40 =item obs 41 42 The obsveratory where data come from, informationnal only 43 44 =item dir 45 46 The based directory where archive are located 47 48 =item glob 49 50 Apply this glob to search files in dir 51 52 =item statusfile 53 54 The file where status info should be written 55 56 =item status 57 58 The Config::IniFiles object 59 60 =back 61 62 =back 63 24 64 =cut 25 65 26 66 sub new { 27 my ($class, $ infos, %param) = @_;28 29 my $or = { %$ infos};67 my ($class, $parent, %param) = @_; 68 69 my $or = { %$parent }; 30 70 foreach (keys %param) { 31 71 $or->{$_} = $param{$_}; 32 72 } 33 73 34 # $infos->35 # obsdata ObsData object36 74 $or->{obsdata} or die "Error #1de8d015, please insult programmer"; 37 # datatype search directly fot it38 # obs station, informationnal only39 # statusfile40 # status Config::IniFile object to store extraction info41 # dir based directory where archive are located42 75 $or->{dir} or die "No dir given"; 43 76 -d $or->{dir} or return undef; 44 # patern glob() over file45 77 46 78 $or->{status} ||= new Config::IniFiles(
Note: See TracChangeset
for help on using the changeset viewer.