IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 8, 2007, 4:10:09 PM (19 years ago)
Author:
Paul Price
Message:

Adding dvo_cameradir to return DVO.CAMERADIR within the camera configuration.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/PS-IPP-Config/lib/PS/IPP/Config.pm

    r11850 r12358  
    11# Copyright (c) 2006  Paul Price, Joshua Hoblitt
    22#
    3 # $Id: Config.pm,v 1.31 2007-02-16 20:58:15 price Exp $
     3# $Id: Config.pm,v 1.32 2007-03-09 02:10:09 price Exp $
    44
    55package PS::IPP::Config;
     
    377377}   
    378378
     379# Return the DVO.CAMERADIR in the camera configuration
     380sub dvo_cameradir
     381{
     382    my $self = shift;           # Configuration object
     383
     384    unless (defined $self) {
     385        carp "Programming error";
     386        exit($PS_EXIT_PROG_ERROR);
     387    }
     388
     389    my $camera = $self->{camera}; # Camera configuration
     390    unless (defined $camera) {
     391        carp "Camera has not yet been defined.\n";
     392        return undef;
     393    }
     394
     395    my $dir = _mdLookupStr($file, "DVO.CAMERADIR"); # Directory of interest
     396    unless (defined $filename) {
     397        carp "Can't find DVO.CAMERADIR in camera configuration.\n";
     398        return undef;
     399    }
     400
     401    return $dir;
     402}
    379403
    380404# Interpolate environment variables in a directory (or colon-delimited list of directories)
Note: See TracChangeset for help on using the changeset viewer.