?RCS: $Id$
?RCS:
?RCS: Copyright (c) 2016 H.Merijn Brand & Todd Rinaldo
?RCS:
?RCS: You may distribute under the terms of either the GNU General Public
?RCS: License or the Artistic License, as specified in the README file.
?RCS:
?MAKE:default_inc_excludes_dot: Myread cat
?MAKE:	-pick add $@ %<
?S:default_inc_excludes_dot:
?S:	When defined, remove the legacy '.' from @INC
?S:.
?C:DEFAULT_INC_EXCLUDES_DOT:
?C:	This symbol, if defined, removes the legacy default behavior of
?C:	including '.' at the end of @INC.
?C:.
?H:#$default_inc_excludes_dot DEFAULT_INC_EXCLUDES_DOT	/**/
?H:.
: Include . in @INC
$cat <<EOM

Historically Perl has provided a final fallback of the current working
directory '.' when searching for a library. This, however, can lead to
problems when a Perl program which loads optional modules is called from
a shared directory. This can lead to executing unexpected code.

EOM

# When changing to exclude by default:
case "$default_inc_excludes_dot" in
    $undef|false|[nN]*) dflt="n" ;;
    *)                  dflt="y" ;;
esac
# To turn exclude off by default:
#case "$default_inc_excludes_dot" in
#    $define|true|[yY]*) dflt="y" ;;
#    *)                  dflt="n" ;;
#esac

rp='Exclude '.' from @INC by default? '
. ./myread
case "$ans" in
    [nN]|undef) default_inc_excludes_dot="$undef"  ;;
    *)          default_inc_excludes_dot="$define" ;;
esac

