IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 17664


Ignore:
Timestamp:
May 13, 2008, 3:52:31 PM (18 years ago)
Author:
bills
Message:

Added $touch parameter to PS-IPP-Config

File:
1 edited

Legend:

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

    r17651 r17664  
    11# Copyright (c) 2006  Paul Price, Joshua Hoblitt
    22#
    3 # $Id: Config.pm,v 1.83 2008-05-13 20:26:53 jhoblitt Exp $
     3# $Id: Config.pm,v 1.84 2008-05-14 01:52:31 bills Exp $
    44
    55package PS::IPP::Config;
     
    364364    my $self = shift;           # Configuration object
    365365    my $name = shift;           # File name to check
     366    my $touch = shift;          # if $name is in nebulous instantiate it
    366367
    367368    my $scheme = file_scheme($name); # The scheme, e.g., file://, path://
     
    374375        $self->_neb_start();
    375376        my $neb = $self->{nebulous}; # Nebulous handle
     377        if ($touch) {
     378            unless ($neb->stat( $name )) {
     379                unless($neb->create( $name )) {
     380                    carp "unable to instantiate $name.";
     381                    exit($PS_EXIT_DATA_ERROR);
     382                }
     383            }
     384        }
    376385        return $neb->find( $name );
    377386    }
Note: See TracChangeset for help on using the changeset viewer.