App-Options

 view release on metacpan or  search on metacpan

bin/prefix  view on Meta::CPAN

267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
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

517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
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

767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
        }
    }
    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

790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
# 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

1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
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.282 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )