in reply to Re: checking values of variables
in thread checking values of variables

this question garnered a fair amount of interest and I appreciate the replies.

Replies are listed 'Best First'.
Re^3: checking values of variables
by Anonymous Monk on Aug 13, 2013 at 12:27 UTC

    this question garnered a fair amount of interest and I appreciate the replies.

    In what way (what did you decide)?

      I decided to stay with what I have (because the scalar variables are used all over the program and I didn't want to do a great deal of editing). However, next time I have this situation I will most likely use:
      for (qw / server database user password ... initversion /) { help() and last unless (defined $cfg->params($_) and $cfg->params +($_));
      and use $cfg->params(server) instead of $server Thanks to all (Perl Monks is fantastic!)
        however, this approach does not allow
        $mail_host = $cfg->param('mail_host') || 'mail@xxx.org'; $support_addr = $cfg->param('support_addr') || 'support@xxx.org' +;
        default values.