IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 11, 2006, 4:49:53 PM (20 years ago)
Author:
jhoblitt
Message:

change ->parse() to gracefully handle undef and empty strings

File:
1 edited

Legend:

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

    r7830 r7865  
    11# Copyright (c) 2005  Joshua Hoblitt
    22#
    3 # $Id: Config.pm,v 1.17 2006-07-06 21:49:27 jhoblitt Exp $
     3# $Id: Config.pm,v 1.18 2006-07-12 02:49:53 jhoblitt Exp $
    44
    55package PS::IPP::Metadata::Config;
     
    3636sub parse {
    3737    my ( $self, $metadata ) = @_;
     38
     39    return undef if not defined $metadata;
     40    return undef if $metadata =~ /^\s*$/;
    3841
    3942    # remove any local data from a prevous run
Note: See TracChangeset for help on using the changeset viewer.