IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 29, 2007, 2:41:06 PM (19 years ago)
Author:
Paul Price
Message:

Removing debugging print statements.

File:
1 edited

Legend:

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

    r11035 r11400  
    11# Copyright (c) 2006  Paul Price, Joshua Hoblitt
    22#
    3 # $Id: Config.pm,v 1.23 2007-01-11 22:13:05 eugene Exp $
     3# $Id: Config.pm,v 1.24 2007-01-30 00:41:06 price Exp $
    44
    55package PS::IPP::Config;
     
    4949    my $camera = shift;         # Camera name
    5050
     51    unless (defined $class) {
     52        carp "Programming error";
     53        exit($PS_EXIT_PROG_ERROR);
     54    }
     55
    5156    # Get location of ipprc file
    5257    my $name;                   # Name of ipprc file
     
    8388    my $self = shift;           # Configuration object
    8489    my $name = shift;           # Camera name
     90
     91    unless (defined $self and defined $name) {
     92        carp "Programming error";
     93        exit($PS_EXIT_PROG_ERROR);
     94    }
    8595
    8696    my $camera_list = _mdLookupMD($self->{_ipprc}, 'CAMERAS'); # List of cameras
     
    118128    my $name = shift;           # datapath name
    119129
     130    unless (defined $self and defined $name) {
     131        carp "Programming error";
     132        exit($PS_EXIT_PROG_ERROR);
     133    }
     134
    120135    my $path_list = _mdLookupMD($self->{_ipprc}, 'DATAPATH'); # List of paths
    121136    my $pathname = _mdLookupStr($path_list, $name); # Path of interest
     
    129144    my $self = shift;           # Configuration object
    130145    my $name = shift;           # raw name
     146
     147    unless (defined $self and defined $name) {
     148        carp "Programming error";
     149        exit($PS_EXIT_PROG_ERROR);
     150    }
    131151
    132152    my $uri = URI->new($name) or die "Unable to parse URI: $name\n"; # URI
     
    163183    my $self = shift;           # Configuration object
    164184    my $name = shift;           # raw name
     185
     186    unless (defined $self and defined $name) {
     187        carp "Programming error";
     188        exit($PS_EXIT_PROG_ERROR);
     189    }
    165190
    166191    $name = File::Spec->canonpath( $name); # Clean up
     
    214239    my $filter = shift;         # Filter name, for extra qualification; optional
    215240
     241    unless (defined $self and defined $name and defined $type) {
     242        carp "Programming error";
     243        exit($PS_EXIT_PROG_ERROR);
     244    }
     245
    216246    my $camera = $self->{camera}; # Camera configuration
    217247    unless (defined $camera) {
     
    267297    my $component = shift;      # For replacing {CHIP.NAME} and {CELL.NAME}
    268298
     299    unless (defined $self and defined $name and defined $output) {
     300        carp "Programming error";
     301        exit($PS_EXIT_PROG_ERROR);
     302    }
     303
    269304    my $camera = $self->{camera}; # Camera configuration
    270305    unless (defined $camera) {
     
    292327
    293328    $filename =~ s/\{OUTPUT\}/$output/;
    294     $filename =~ s/\{CHIP\.NAME\}/$component/;
    295     $filename =~ s/\{CELL\.NAME\}/$component/;
     329    if ($filename =~ /\{CHIP\.NAME\}/) {
     330        unless (defined $component) {
     331            carp "Programming error";
     332            exit($PS_EXIT_PROG_ERROR);
     333        }
     334        $filename =~ s/\{CHIP\.NAME\}/$component/;
     335        $filename =~ s/\{CELL\.NAME\}/$component/;
     336    }
    296337
    297338    return $filename;
     
    321362    my $name = shift;           # Name of item to look up
    322363
     364    unless (defined $mdc and defined $name) {
     365        carp "Programming error";
     366        exit($PS_EXIT_PROG_ERROR);
     367    }
     368
    323369    # Iterate through the array of hashes
    324370    foreach my $item (@$mdc) {
     
    339385    my $name = shift;           # Name of item to look ip
    340386
     387    unless (defined $mdc and defined $name) {
     388        carp "Programming error";
     389        exit($PS_EXIT_PROG_ERROR);
     390    }
     391
    341392    # Iterate through the array of hashes
    342393    foreach my $item (@$mdc) {
     
    357408    my $mdc = shift;            # Metadata config to look up
    358409    my $name = shift;           # Name of item to look ip
     410
     411    unless (defined $mdc and defined $name) {
     412        carp "Programming error";
     413        exit($PS_EXIT_PROG_ERROR);
     414    }
    359415
    360416    # Iterate through the array of hashes
Note: See TracChangeset for help on using the changeset viewer.