App-Options
view release on metacpan or search on metacpan
267268269270271272273274275276277278279280281282283284285286if
[[
"$LIBPATH"
=
""
]]
then
export LIBPATH=
$AUX_LIBPATH
$PREFIX
/lib
$AUX_LIBPATHPOST
else
export LIBPATH=
$AUX_LIBPATH
$PREFIX
/lib
$AUX_LIBPATHPOST
:
$LIBPATH
fi
# Add new references into the MANPATH
if
[[
"$MANPATH"
=
""
]]
then
# guess at the base MANPATH
MANPATH=$(ls -d /man /*/man /*/*/man 2> /dev/null |
tr
'\n'
':'
| sed
's/:$//'
)
fi
# Add new references into the MANPATH
if
[[
"$MANPATH"
=
""
]]
then
export MANPATH=
$AUX_MANPATH
$PREFIX
/share/man:
$PREFIX
/man
$AUX_MANPATHPOST
else
export MANPATH=
$AUX_MANPATH
$PREFIX
/share/man:
$PREFIX
/man
$AUX_MANPATHPOST
:
$MANPATH
fi
lib/App/Options.pm view on Meta::CPAN
517518519520521522523524525526527528529530531532533534535536537my
(
$prog_cat
,
$prog_dir
,
$prog_file
);
# i.e. C:\perl\bin\app, \app
(
$prog_cat
,
$prog_dir
,
$prog_file
) = File::Spec->splitpath($0);
$prog_dir
=~ s!\\!/!g;
# transform to POSIX-compliant (forward slashes)
$prog_dir
=~ s!/$!!
if
(
$prog_dir
ne
"/"
);
# remove trailing slash
$prog_dir
=
"."
if
(
$prog_dir
eq
""
);
$prog_dir
=
$prog_cat
.
$prog_dir
if
($^O =~ /MSWin32/ and
$prog_dir
=~ m!^/!);
#################################################################
# 3. guess the "prefix" directory for the entire
# software installation. The program is usually in
# $prefix/bin or $prefix/cgi-bin.
#################################################################
my
$prefix
=
$values
->{prefix};
# possibly set on command line
my
$prefix_origin
=
"command line"
;
# it can be set in environment.
if
(!
$prefix
&&
$ENV
{PREFIX}) {
$prefix
=
$ENV
{PREFIX};
$prefix_origin
=
"environment"
;
lib/App/Options.pm view on Meta::CPAN
767768769770771772773774775776777778779780781782783784785786787
}
}
else
{
STDERR
"9. No Directories Added to \@INC\n"
if
(
$debug_options
>= 2);
}
}
else
{
my
$libdir
=
"$prefix/lib"
;
my
$libdir_found
= 0;
# Look to see whether this PREFIX has been included already in @INC.
# If it has, we do *not* want to automagically guess which directories
# should be searched and in which order.
foreach
my
$incdir
(
@INC
) {
if
(
$incdir
=~ m!^
$libdir
!) {
$libdir_found
= 1;
last
;
}
}
# The traditional way to install software from CPAN uses
# ExtUtils::MakeMaker via Makefile.PL with the "make install"
lib/App/Options.pm view on Meta::CPAN
790791792793794795796797798799800801802803804805806807808809810# command. This would typically put modules into the
# $PREFIX/lib/perl5/site_perl/$perlversion directory.
# However, a newer way to install software (and recent versions
# of CPAN.pm understand this) uses Module::Build via Build.PL
# with the "Build install" command. If you are installing this
# software to non-standard places, you would use the
# "perl Build.PL install_base=$PREFIX" command. This would
# typically put modules into the $PREFIX/lib directory.
# So if we need to guess about extra directories to add to the
# @INC variable ($PREFIX/lib is nowhere currently represented
# in @INC), we should add directories which work for software
# installed with either Module::Build or ExtUtils::MakeMaker.
if
(!
$libdir_found
) {
unshift
(
@INC
,
"$libdir"
);
if
($^V) {
my
$perlversion
=
sprintf
(
"%vd"
, $^V);
unshift
(
@INC
,
$libdir
);
if
(-d
"$libdir/perl5"
) {
lib/App/Options.pm view on Meta::CPAN
174617471748174917501751175217531754175517561757175817591760176117621763176417651766from
$prefix
/lib/*.
This is where the
"perlinc"
option comes in.
If
"perlinc"
is set, it is understood to be a list of paths
(separated by /[ ,;]+/) to be prepended to the
@INC
variable.
If
"perlinc"
is not set,
"$prefix/lib/perl5/$perlversion"
and
"$prefix/lib/perl5/site_perl/$perlversion"
are automatically
prepended to the
@INC
variable as a best guess.
=head2 Special Option debug_options
If the "debug_options" variable is set (often on the command
line), the list of option files that was searched is printed
out, the resulting list of variable values is printed out,
and the resulting list of include directories (@INC) is printed
out.
=head2 Version
( run in 0.282 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )