Changeset 220
- Timestamp:
- 04/09/06 03:08:46 (18 years ago)
- Location:
- trunk/soft/ObsData
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/soft/ObsData/ObsData.pm
r219 r220 150 150 } 151 151 152 =head2 get_sub_plugin 153 154 Return code ref of plugintype for datatype 155 156 =cut 157 158 sub get_sub_plugin { 159 my ($self, $datatype, $plugintype) = @_; 160 if (exists($self->{plugin}{$datatype}{$plugintype})) { 161 return $self->{plugin}{$datatype}{$plugintype}; 162 } else { 163 return undef; 164 } 165 } 166 152 167 =head2 logging($level, $message, ...) 153 168 -
trunk/soft/ObsData/t/O-02.t
r193 r220 4 4 use warnings; 5 5 6 use Test::More tests => 2 0;6 use Test::More tests => 21; 7 7 use File::Temp qw(tempdir); 8 8 use POSIX qw(strftime); … … 39 39 ok(eq_set([ $o->get_datadir('ohp', 'ozone') ], [ 'testdata/ohp/ozone', 'testdata/ohp' ]) , 'Can retrive data directory'); 40 40 ok(eq_set([ $o->list_datatype ], [ 'oxygene', 'ozone' ]), "can get data type"); 41 print STDERR join(" ", $o->list_datatype); 41 42 ok(ref $o->get_sub_plugin('ozone', 'match_plugin') eq 'CODE', 'can get plugin code'); 42 43 43 44 $o = undef; # Explicit destroy
Note: See TracChangeset
for help on using the changeset viewer.