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

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

In what way (what did you decide)?

Replies are listed 'Best First'.
Re^4: checking values of variables
by Anonymous Monk on Aug 13, 2013 at 13:51 UTC
    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.