perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juan Jose Natera" <nater...@gmail.com>
Subject Re: i want to "die", but mod_perl won't let me
Date Thu, 22 Feb 2007 02:32:19 GMT
Hi,

On 2/21/07, Jonathan Vanasco <jvanasco@2xlp.com> wrote:
>
> startup.pl has this:
>
>         use MyConfig::ServerLayout;
>
> and then:
>
>         package MyConfig::ServerLayout;
>
>         my      $_environment= $ENV{'SERVER_TYPE'};
>         if ( !defined $_environment ) {
>                 die "ERROR! You MUST define SERVER_TYPE in \$ENV !";
>         }

It's not pretty, and there is probably a better way, but:

if ( !defined $_environment ) {
          # this will end up in your error log
          print STDERR "ERROR! You MUST define SERVER_TYPE in \$ENV !";
          # and this makes MyConfig::ServerLayout return false
          return 0;
}

Juan

Mime
View raw message