You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Juan Jose Natera <na...@gmail.com> on 2007/02/22 03:32:19 UTC

Re: i want to "die", but mod_perl won't let me

Hi,

On 2/21/07, Jonathan Vanasco <jv...@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