App-Options
view release on metacpan or search on metacpan
if [[ "$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
my ($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
}
}
else {
print 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
# 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
from $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.484 second using v1.01-cache-2.11-cpan-748bfb374f4 )