perl5ever has asked for the wisdom of the Perl Monks concerning the following question:

Couple of questions about some perl environment variables.

The documentation for PERL_SIGNALS reads:


  PERL_SIGNALS
              In Perls 5.8.1 and later.  If set to "unsafe" the pre-Perl-5.8.0 signals
              behaviour (immediate but unsafe) is restored.  If set to "safe" the safe (or
              deferred) signals are used.  See "Deferred Signals (Safe Signals)" in perlipc.
I wonder what happens if PERL_SIGNALS is unset or is not either of safe or unsafe.

Also, when I do a perl -V on 5.8.8, the environment variable PERL_HOME is display. Is that used at all for anything?

Replies are listed 'Best First'.
Re: PERL_SIGNALS and PERL_HOME
by ikegami (Patriarch) on Apr 17, 2009 at 16:33 UTC

    Safe is the normal behaviour, as documented at the link you quoted. PERL_SIGNALS is a mean of restoring the old, unsafe behaviour.

    Also, when I do a perl -V on 5.8.8, the environment variable PERL_HOME is display. Is that used at all for anything?

    It seems that perl -V displays all env vars starting with PERL.

    $ PERLfoo=bar perl -V Summary of my perl5 (revision 5 version 8 subversion 8) configuration: ... %ENV: PERL5LIB="/home/eric/lib/perl5" PERLfoo="bar" @INC: ...

    There's no implication that the variable is used at all by perl. And since it's not listed in perlrun, it probably isn't.

Re: PERL_SIGNALS and PERL_HOME
by toolic (Bishop) on Apr 17, 2009 at 16:33 UTC
    Also, when I do a perl -V on 5.8.8, the environment variable PERL_HOME is display. Is that used at all for anything?
    Since PERL_HOME is not mentioned in ENVIRONMENT for 5.8.8, it does not seem to be an official Perl environment variable. It seems as though whoever set up your environment has added this specifically for your workplace. I ran a little experiment, and it seems like perl -V will display any environment variables which begin with PERL, regardless of whether they are mentioned in perlrun:
    $ perl -V Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Platform: osname=linux, osvers=2.6.9-67.elsmp, archname=x86_64-linux ... %ENV: PERLDOC="-i" @INC: ... $ $ echo $PERLFOO PERLFOO: Undefined variable. $ setenv PERLFOO bar $ echo $PERLFOO bar $ perl -V ... %ENV: PERLDOC="-i" PERLFOO="bar" @INC: ... $