Blame README

Packit dc272c
NAME
Packit dc272c
    local::lib - create and use a local lib/ for perl modules with PERL5LIB
Packit dc272c
Packit dc272c
SYNOPSIS
Packit dc272c
    In code -
Packit dc272c
Packit dc272c
      use local::lib; # sets up a local lib at ~/perl5
Packit dc272c
Packit dc272c
      use local::lib '~/foo'; # same, but ~/foo
Packit dc272c
Packit dc272c
      # Or...
Packit dc272c
      use FindBin;
Packit dc272c
      use local::lib "$FindBin::Bin/../support";  # app-local support library
Packit dc272c
Packit dc272c
    From the shell -
Packit dc272c
Packit dc272c
      # Install LWP and its missing dependencies to the '~/perl5' directory
Packit dc272c
      perl -MCPAN -Mlocal::lib -e 'CPAN::install(LWP)'
Packit dc272c
Packit dc272c
      # Just print out useful shell commands
Packit dc272c
      $ perl -Mlocal::lib
Packit dc272c
      PERL_MB_OPT='--install_base /home/username/perl5'; export PERL_MB_OPT;
Packit dc272c
      PERL_MM_OPT='INSTALL_BASE=/home/username/perl5'; export PERL_MM_OPT;
Packit dc272c
      PERL5LIB="/home/username/perl5/lib/perl5"; export PERL5LIB;
Packit dc272c
      PATH="/home/username/perl5/bin:$PATH"; export PATH;
Packit dc272c
      PERL_LOCAL_LIB_ROOT="/home/usename/perl5:$PERL_LOCAL_LIB_ROOT"; export PERL_LOCAL_LIB_ROOT;
Packit dc272c
Packit dc272c
    From a .bash_profile or .bashrc file -
Packit dc272c
Packit dc272c
      eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)"
Packit dc272c
Packit dc272c
  The bootstrapping technique
Packit dc272c
    A typical way to install local::lib is using what is known as the
Packit dc272c
    "bootstrapping" technique. You would do this if your system
Packit dc272c
    administrator hasn't already installed local::lib. In this case, you'll
Packit dc272c
    need to install local::lib in your home directory.
Packit dc272c
Packit dc272c
    Even if you do have administrative privileges, you will still want to
Packit dc272c
    set up your environment variables, as discussed in step 4. Without this,
Packit dc272c
    you would still install the modules into the system CPAN installation
Packit dc272c
    and also your Perl scripts will not use the lib/ path you bootstrapped
Packit dc272c
    with local::lib.
Packit dc272c
Packit dc272c
    By default local::lib installs itself and the CPAN modules into ~/perl5.
Packit dc272c
Packit dc272c
    Windows users must also see "Differences when using this module under
Packit dc272c
    Win32".
Packit dc272c
Packit dc272c
    1.  Download and unpack the local::lib tarball from CPAN (search for
Packit dc272c
        "Download" on the CPAN page about local::lib). Do this as an
Packit dc272c
        ordinary user, not as root or administrator. Unpack the file in your
Packit dc272c
        home directory or in any other convenient location.
Packit dc272c
Packit dc272c
    2.  Run this:
Packit dc272c
Packit dc272c
          perl Makefile.PL --bootstrap
Packit dc272c
Packit dc272c
        If the system asks you whether it should automatically configure as
Packit dc272c
        much as possible, you would typically answer yes.
Packit dc272c
Packit dc272c
        In order to install local::lib into a directory other than the
Packit dc272c
        default, you need to specify the name of the directory when you call
Packit dc272c
        bootstrap, as follows:
Packit dc272c
Packit dc272c
          perl Makefile.PL --bootstrap=~/foo
Packit dc272c
Packit dc272c
    3.  Run this: (local::lib assumes you have make installed on your
Packit dc272c
        system)
Packit dc272c
Packit dc272c
          make test && make install
Packit dc272c
Packit dc272c
    4.  Now we need to setup the appropriate environment variables, so that
Packit dc272c
        Perl starts using our newly generated lib/ directory. If you are
Packit dc272c
        using bash or any other Bourne shells, you can add this to your
Packit dc272c
        shell startup script this way:
Packit dc272c
Packit dc272c
          echo 'eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)"' >>~/.bashrc
Packit dc272c
Packit dc272c
        If you are using C shell, you can do this as follows:
Packit dc272c
Packit dc272c
          /bin/csh
Packit dc272c
          echo $SHELL
Packit dc272c
          /bin/csh
Packit dc272c
          echo 'eval `perl -I$HOME/perl5/lib/perl5 -Mlocal::lib`' >> ~/.cshrc
Packit dc272c
Packit dc272c
        If you passed to bootstrap a directory other than default, you also
Packit dc272c
        need to give that as import parameter to the call of the local::lib
Packit dc272c
        module like this way:
Packit dc272c
Packit dc272c
          echo 'eval "$(perl -I$HOME/foo/lib/perl5 -Mlocal::lib=$HOME/foo)"' >>~/.bashrc
Packit dc272c
Packit dc272c
        After writing your shell configuration file, be sure to re-read it
Packit dc272c
        to get the changed settings into your current shell's environment.
Packit dc272c
        Bourne shells use ". ~/.bashrc" for this, whereas C shells use
Packit dc272c
        "source ~/.cshrc".
Packit dc272c
Packit dc272c
    If you're on a slower machine, or are operating under draconian disk
Packit dc272c
    space limitations, you can disable the automatic generation of manpages
Packit dc272c
    from POD when installing modules by using the "--no-manpages" argument
Packit dc272c
    when bootstrapping:
Packit dc272c
Packit dc272c
      perl Makefile.PL --bootstrap --no-manpages
Packit dc272c
Packit dc272c
    To avoid doing several bootstrap for several Perl module environments on
Packit dc272c
    the same account, for example if you use it for several different
Packit dc272c
    deployed applications independently, you can use one bootstrapped
Packit dc272c
    local::lib installation to install modules in different directories
Packit dc272c
    directly this way:
Packit dc272c
Packit dc272c
      cd ~/mydir1
Packit dc272c
      perl -Mlocal::lib=./
Packit dc272c
      eval $(perl -Mlocal::lib=./)  ### To set the environment for this shell alone
Packit dc272c
      printenv                      ### You will see that ~/mydir1 is in the PERL5LIB
Packit dc272c
      perl -MCPAN -e install ...    ### whatever modules you want
Packit dc272c
      cd ../mydir2
Packit dc272c
      ... REPEAT ...
Packit dc272c
Packit dc272c
    If you use .bashrc to activate a local::lib automatically, the
Packit dc272c
    local::lib will be re-enabled in any sub-shells used, overriding
Packit dc272c
    adjustments you may have made in the parent shell. To avoid this, you
Packit dc272c
    can initialize the local::lib in .bash_profile rather than .bashrc, or
Packit dc272c
    protect the local::lib invocation with a $SHLVL check:
Packit dc272c
Packit dc272c
      [ $SHLVL -eq 1 ] && eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)"
Packit dc272c
Packit dc272c
    If you are working with several "local::lib" environments, you may want
Packit dc272c
    to remove some of them from the current environment without disturbing
Packit dc272c
    the others. You can deactivate one environment like this (using bourne
Packit dc272c
    sh):
Packit dc272c
Packit dc272c
      eval $(perl -Mlocal::lib=--deactivate,~/path)
Packit dc272c
Packit dc272c
    which will generate and run the commands needed to remove "~/path" from
Packit dc272c
    your various search paths. Whichever environment was activated most
Packit dc272c
    recently will remain the target for module installations. That is, if
Packit dc272c
    you activate "~/path_A" and then you activate "~/path_B", new modules
Packit dc272c
    you install will go in "~/path_B". If you deactivate "~/path_B" then
Packit dc272c
    modules will be installed into "~/pathA" -- but if you deactivate
Packit dc272c
    "~/path_A" then they will still be installed in "~/pathB" because pathB
Packit dc272c
    was activated later.
Packit dc272c
Packit dc272c
    You can also ask "local::lib" to clean itself completely out of the
Packit dc272c
    current shell's environment with the "--deactivate-all" option. For
Packit dc272c
    multiple environments for multiple apps you may need to include a
Packit dc272c
    modified version of the "use FindBin" instructions in the "In code"
Packit dc272c
    sample above. If you did something like the above, you have a set of
Packit dc272c
    Perl modules at "~/mydir1/lib". If you have a script at
Packit dc272c
    "~/mydir1/scripts/myscript.pl", you need to tell it where to find the
Packit dc272c
    modules you installed for it at "~/mydir1/lib".
Packit dc272c
Packit dc272c
    In "~/mydir1/scripts/myscript.pl":
Packit dc272c
Packit dc272c
      use strict;
Packit dc272c
      use warnings;
Packit dc272c
      use local::lib "$FindBin::Bin/..";  ### points to ~/mydir1 and local::lib finds lib
Packit dc272c
      use lib "$FindBin::Bin/../lib";     ### points to ~/mydir1/lib
Packit dc272c
Packit dc272c
    Put this before any BEGIN { ... } blocks that require the modules you
Packit dc272c
    installed.
Packit dc272c
Packit dc272c
  Differences when using this module under Win32
Packit dc272c
    To set up the proper environment variables for your current session of
Packit dc272c
    "CMD.exe", you can use this:
Packit dc272c
Packit dc272c
      C:\>perl -Mlocal::lib
Packit dc272c
      set PERL_MB_OPT=--install_base C:\DOCUME~1\ADMINI~1\perl5
Packit dc272c
      set PERL_MM_OPT=INSTALL_BASE=C:\DOCUME~1\ADMINI~1\perl5
Packit dc272c
      set PERL5LIB=C:\DOCUME~1\ADMINI~1\perl5\lib\perl5
Packit dc272c
      set PATH=C:\DOCUME~1\ADMINI~1\perl5\bin;%PATH%
Packit dc272c
Packit dc272c
      ### To set the environment for this shell alone
Packit dc272c
      C:\>perl -Mlocal::lib > %TEMP%\tmp.bat && %TEMP%\tmp.bat && del %TEMP%\tmp.bat
Packit dc272c
      ### instead of $(perl -Mlocal::lib=./)
Packit dc272c
Packit dc272c
    If you want the environment entries to persist, you'll need to add them
Packit dc272c
    to the Control Panel's System applet yourself or use
Packit dc272c
    App::local::lib::Win32Helper.
Packit dc272c
Packit dc272c
    The "~" is translated to the user's profile directory (the directory
Packit dc272c
    named for the user under "Documents and Settings" (Windows XP or
Packit dc272c
    earlier) or "Users" (Windows Vista or later)) unless $ENV{HOME} exists.
Packit dc272c
    After that, the home directory is translated to a short name (which
Packit dc272c
    means the directory must exist) and the subdirectories are created.
Packit dc272c
Packit dc272c
   PowerShell
Packit dc272c
    local::lib also supports PowerShell, and can be used with the
Packit dc272c
    "Invoke-Expression" cmdlet.
Packit dc272c
Packit dc272c
      Invoke-Expression "$(perl -Mlocal::lib)"
Packit dc272c
Packit dc272c
RATIONALE
Packit dc272c
    The version of a Perl package on your machine is not always the version
Packit dc272c
    you need. Obviously, the best thing to do would be to update to the
Packit dc272c
    version you need. However, you might be in a situation where you're
Packit dc272c
    prevented from doing this. Perhaps you don't have system administrator
Packit dc272c
    privileges; or perhaps you are using a package management system such as
Packit dc272c
    Debian, and nobody has yet gotten around to packaging up the version you
Packit dc272c
    need.
Packit dc272c
Packit dc272c
    local::lib solves this problem by allowing you to create your own
Packit dc272c
    directory of Perl packages downloaded from CPAN (in a multi-user system,
Packit dc272c
    this would typically be within your own home directory). The existing
Packit dc272c
    system Perl installation is not affected; you simply invoke Perl with
Packit dc272c
    special options so that Perl uses the packages in your own local package
Packit dc272c
    directory rather than the system packages. local::lib arranges things so
Packit dc272c
    that your locally installed version of the Perl packages takes
Packit dc272c
    precedence over the system installation.
Packit dc272c
Packit dc272c
    If you are using a package management system (such as Debian), you don't
Packit dc272c
    need to worry about Debian and CPAN stepping on each other's toes. Your
Packit dc272c
    local version of the packages will be written to an entirely separate
Packit dc272c
    directory from those installed by Debian.
Packit dc272c
Packit dc272c
DESCRIPTION
Packit dc272c
    This module provides a quick, convenient way of bootstrapping a
Packit dc272c
    user-local Perl module library located within the user's home directory.
Packit dc272c
    It also constructs and prints out for the user the list of environment
Packit dc272c
    variables using the syntax appropriate for the user's current shell (as
Packit dc272c
    specified by the "SHELL" environment variable), suitable for directly
Packit dc272c
    adding to one's shell configuration file.
Packit dc272c
Packit dc272c
    More generally, local::lib allows for the bootstrapping and usage of a
Packit dc272c
    directory containing Perl modules outside of Perl's @INC. This makes it
Packit dc272c
    easier to ship an application with an app-specific copy of a Perl
Packit dc272c
    module, or collection of modules. Useful in cases like when an upstream
Packit dc272c
    maintainer hasn't applied a patch to a module of theirs that you need
Packit dc272c
    for your application.
Packit dc272c
Packit dc272c
    On import, local::lib sets the following environment variables to
Packit dc272c
    appropriate values:
Packit dc272c
Packit dc272c
    PERL_MB_OPT
Packit dc272c
    PERL_MM_OPT
Packit dc272c
    PERL5LIB
Packit dc272c
    PATH
Packit dc272c
    PERL_LOCAL_LIB_ROOT
Packit dc272c
Packit dc272c
    When possible, these will be appended to instead of overwritten
Packit dc272c
    entirely.
Packit dc272c
Packit dc272c
    These values are then available for reference by any code after import.
Packit dc272c
Packit dc272c
CREATING A SELF-CONTAINED SET OF MODULES
Packit dc272c
    See lib::core::only for one way to do this - but note that there are a
Packit dc272c
    number of caveats, and the best approach is always to perform a build
Packit dc272c
    against a clean perl (i.e. site and vendor as close to empty as
Packit dc272c
    possible).
Packit dc272c
Packit dc272c
IMPORT OPTIONS
Packit dc272c
    Options are values that can be passed to the "local::lib" import besides
Packit dc272c
    the directory to use. They are specified as "use local::lib '--option'[,
Packit dc272c
    path];" or "perl -Mlocal::lib=--option[,path]".
Packit dc272c
Packit dc272c
  --deactivate
Packit dc272c
    Remove the chosen path (or the default path) from the module search
Packit dc272c
    paths if it was added by "local::lib", instead of adding it.
Packit dc272c
Packit dc272c
  --deactivate-all
Packit dc272c
    Remove all directories that were added to search paths by "local::lib"
Packit dc272c
    from the search paths.
Packit dc272c
Packit dc272c
  --shelltype
Packit dc272c
    Specify the shell type to use for output. By default, the shell will be
Packit dc272c
    detected based on the environment. Should be one of: "bourne", "csh",
Packit dc272c
    "cmd", or "powershell".
Packit dc272c
Packit dc272c
  --no-create
Packit dc272c
    Prevents "local::lib" from creating directories when activating dirs.
Packit dc272c
    This is likely to cause issues on Win32 systems.
Packit dc272c
Packit dc272c
CLASS METHODS
Packit dc272c
  ensure_dir_structure_for
Packit dc272c
    Arguments: $path
Packit dc272c
    Return value: None
Packit dc272c
Packit dc272c
    Attempts to create a local::lib directory, including subdirectories and
Packit dc272c
    all required parent directories. Throws an exception on failure.
Packit dc272c
Packit dc272c
  print_environment_vars_for
Packit dc272c
    Arguments: $path
Packit dc272c
    Return value: None
Packit dc272c
Packit dc272c
    Prints to standard output the variables listed above, properly set to
Packit dc272c
    use the given path as the base directory.
Packit dc272c
Packit dc272c
  build_environment_vars_for
Packit dc272c
    Arguments: $path
Packit dc272c
    Return value: %environment_vars
Packit dc272c
Packit dc272c
    Returns a hash with the variables listed above, properly set to use the
Packit dc272c
    given path as the base directory.
Packit dc272c
Packit dc272c
  setup_env_hash_for
Packit dc272c
    Arguments: $path
Packit dc272c
    Return value: None
Packit dc272c
Packit dc272c
    Constructs the %ENV keys for the given path, by calling
Packit dc272c
    "build_environment_vars_for".
Packit dc272c
Packit dc272c
  active_paths
Packit dc272c
    Arguments: None
Packit dc272c
    Return value: @paths
Packit dc272c
Packit dc272c
    Returns a list of active "local::lib" paths, according to the
Packit dc272c
    "PERL_LOCAL_LIB_ROOT" environment variable and verified against what is
Packit dc272c
    really in @INC.
Packit dc272c
Packit dc272c
  install_base_perl_path
Packit dc272c
    Arguments: $path
Packit dc272c
    Return value: $install_base_perl_path
Packit dc272c
Packit dc272c
    Returns a path describing where to install the Perl modules for this
Packit dc272c
    local library installation. Appends the directories "lib" and "perl5" to
Packit dc272c
    the given path.
Packit dc272c
Packit dc272c
  lib_paths_for
Packit dc272c
    Arguments: $path
Packit dc272c
    Return value: @lib_paths
Packit dc272c
Packit dc272c
    Returns the list of paths perl will search for libraries, given a base
Packit dc272c
    path. This includes the base path itself, the architecture specific
Packit dc272c
    subdirectory, and perl version specific subdirectories. These paths may
Packit dc272c
    not all exist.
Packit dc272c
Packit dc272c
  install_base_bin_path
Packit dc272c
    Arguments: $path
Packit dc272c
    Return value: $install_base_bin_path
Packit dc272c
Packit dc272c
    Returns a path describing where to install the executable programs for
Packit dc272c
    this local library installation. Appends the directory "bin" to the
Packit dc272c
    given path.
Packit dc272c
Packit dc272c
  installer_options_for
Packit dc272c
    Arguments: $path
Packit dc272c
    Return value: %installer_env_vars
Packit dc272c
Packit dc272c
    Returns a hash of environment variables that should be set to cause
Packit dc272c
    installation into the given path.
Packit dc272c
Packit dc272c
  resolve_empty_path
Packit dc272c
    Arguments: $path
Packit dc272c
    Return value: $base_path
Packit dc272c
Packit dc272c
    Builds and returns the base path into which to set up the local module
Packit dc272c
    installation. Defaults to "~/perl5".
Packit dc272c
Packit dc272c
  resolve_home_path
Packit dc272c
    Arguments: $path
Packit dc272c
    Return value: $home_path
Packit dc272c
Packit dc272c
    Attempts to find the user's home directory. If installed, uses
Packit dc272c
    "File::HomeDir" for this purpose. If no definite answer is available,
Packit dc272c
    throws an exception.
Packit dc272c
Packit dc272c
  resolve_relative_path
Packit dc272c
    Arguments: $path
Packit dc272c
    Return value: $absolute_path
Packit dc272c
Packit dc272c
    Translates the given path into an absolute path.
Packit dc272c
Packit dc272c
  resolve_path
Packit dc272c
    Arguments: $path
Packit dc272c
    Return value: $absolute_path
Packit dc272c
Packit dc272c
    Calls the following in a pipeline, passing the result from the previous
Packit dc272c
    to the next, in an attempt to find where to configure the environment
Packit dc272c
    for a local library installation: "resolve_empty_path",
Packit dc272c
    "resolve_home_path", "resolve_relative_path". Passes the given path
Packit dc272c
    argument to "resolve_empty_path" which then returns a result that is
Packit dc272c
    passed to "resolve_home_path", which then has its result passed to
Packit dc272c
    "resolve_relative_path". The result of this final call is returned from
Packit dc272c
    "resolve_path".
Packit dc272c
Packit dc272c
OBJECT INTERFACE
Packit dc272c
  new
Packit dc272c
    Arguments: %attributes
Packit dc272c
    Return value: $local_lib
Packit dc272c
Packit dc272c
    Constructs a new "local::lib" object, representing the current state of
Packit dc272c
    @INC and the relevant environment variables.
Packit dc272c
Packit dc272c
ATTRIBUTES
Packit dc272c
  roots
Packit dc272c
    An arrayref representing active "local::lib" directories.
Packit dc272c
Packit dc272c
  inc
Packit dc272c
    An arrayref representing @INC.
Packit dc272c
Packit dc272c
  libs
Packit dc272c
    An arrayref representing the PERL5LIB environment variable.
Packit dc272c
Packit dc272c
  bins
Packit dc272c
    An arrayref representing the PATH environment variable.
Packit dc272c
Packit dc272c
  extra
Packit dc272c
    A hashref of extra environment variables (e.g. "PERL_MM_OPT" and
Packit dc272c
    "PERL_MB_OPT")
Packit dc272c
Packit dc272c
  no_create
Packit dc272c
    If set, "local::lib" will not try to create directories when activating
Packit dc272c
    them.
Packit dc272c
Packit dc272c
OBJECT METHODS
Packit dc272c
  clone
Packit dc272c
    Arguments: %attributes
Packit dc272c
    Return value: $local_lib
Packit dc272c
Packit dc272c
    Constructs a new "local::lib" object based on the existing one,
Packit dc272c
    overriding the specified attributes.
Packit dc272c
Packit dc272c
  activate
Packit dc272c
    Arguments: $path
Packit dc272c
    Return value: $new_local_lib
Packit dc272c
Packit dc272c
    Constructs a new instance with the specified path active.
Packit dc272c
Packit dc272c
  deactivate
Packit dc272c
    Arguments: $path
Packit dc272c
    Return value: $new_local_lib
Packit dc272c
Packit dc272c
    Constructs a new instance with the specified path deactivated.
Packit dc272c
Packit dc272c
  deactivate_all
Packit dc272c
    Arguments: None
Packit dc272c
    Return value: $new_local_lib
Packit dc272c
Packit dc272c
    Constructs a new instance with all "local::lib" directories deactivated.
Packit dc272c
Packit dc272c
  environment_vars_string
Packit dc272c
    Arguments: [ $shelltype ]
Packit dc272c
    Return value: $shell_env_string
Packit dc272c
Packit dc272c
    Returns a string to set up the "local::lib", meant to be run by a shell.
Packit dc272c
Packit dc272c
  build_environment_vars
Packit dc272c
    Arguments: None
Packit dc272c
    Return value: %environment_vars
Packit dc272c
Packit dc272c
    Returns a hash with the variables listed above, properly set to use the
Packit dc272c
    given path as the base directory.
Packit dc272c
Packit dc272c
  setup_env_hash
Packit dc272c
    Arguments: None
Packit dc272c
    Return value: None
Packit dc272c
Packit dc272c
    Constructs the %ENV keys for the given path, by calling
Packit dc272c
    "build_environment_vars".
Packit dc272c
Packit dc272c
  setup_local_lib
Packit dc272c
    Constructs the %ENV hash using "setup_env_hash", and set up @INC.
Packit dc272c
Packit dc272c
A WARNING ABOUT UNINST=1
Packit dc272c
    Be careful about using local::lib in combination with "make install
Packit dc272c
    UNINST=1". The idea of this feature is that will uninstall an old
Packit dc272c
    version of a module before installing a new one. However it lacks a
Packit dc272c
    safety check that the old version and the new version will go in the
Packit dc272c
    same directory. Used in combination with local::lib, you can potentially
Packit dc272c
    delete a globally accessible version of a module while installing the
Packit dc272c
    new version in a local place. Only combine "make install UNINST=1" and
Packit dc272c
    local::lib if you understand these possible consequences.
Packit dc272c
Packit dc272c
LIMITATIONS
Packit dc272c
    *   Directory names with spaces in them are not well supported by the
Packit dc272c
        perl toolchain and the programs it uses. Pure-perl distributions
Packit dc272c
        should support spaces, but problems are more likely with dists that
Packit dc272c
        require compilation. A workaround you can do is moving your
Packit dc272c
        local::lib to a directory with spaces after you installed all
Packit dc272c
        modules inside your local::lib bootstrap. But be aware that you
Packit dc272c
        can't update or install CPAN modules after the move.
Packit dc272c
Packit dc272c
    *   Rather basic shell detection. Right now anything with csh in its
Packit dc272c
        name is assumed to be a C shell or something compatible, and
Packit dc272c
        everything else is assumed to be Bourne, except on Win32 systems. If
Packit dc272c
        the "SHELL" environment variable is not set, a Bourne-compatible
Packit dc272c
        shell is assumed.
Packit dc272c
Packit dc272c
    *   Kills any existing PERL_MM_OPT or PERL_MB_OPT.
Packit dc272c
Packit dc272c
    *   Should probably auto-fixup CPAN config if not already done.
Packit dc272c
Packit dc272c
    *   On VMS and MacOS Classic (pre-OS X), local::lib loads File::Spec.
Packit dc272c
        This means any File::Spec version installed in the local::lib will
Packit dc272c
        be ignored by scripts using local::lib. A workaround for this is
Packit dc272c
        using "use lib "$local_lib/lib/perl5";" instead of using
Packit dc272c
        "local::lib" directly.
Packit dc272c
Packit dc272c
    *   Conflicts with ExtUtils::MakeMaker's "PREFIX" option. "local::lib"
Packit dc272c
        uses the "INSTALL_BASE" option, as it has more predictable and sane
Packit dc272c
        behavior. If something attempts to use the "PREFIX" option when
Packit dc272c
        running a Makefile.PL, ExtUtils::MakeMaker will refuse to run, as
Packit dc272c
        the two options conflict. This can be worked around by temporarily
Packit dc272c
        unsetting the "PERL_MM_OPT" environment variable.
Packit dc272c
Packit dc272c
    *   Conflicts with Module::Build's "--prefix" option. Similar to the
Packit dc272c
        previous limitation, but any "--prefix" option specified will be
Packit dc272c
        ignored. This can be worked around by temporarily unsetting the
Packit dc272c
        "PERL_MB_OPT" environment variable.
Packit dc272c
Packit dc272c
    Patches very much welcome for any of the above.
Packit dc272c
Packit dc272c
    *   On Win32 systems, does not have a way to write the created
Packit dc272c
        environment variables to the registry, so that they can persist
Packit dc272c
        through a reboot.
Packit dc272c
Packit dc272c
TROUBLESHOOTING
Packit dc272c
    If you've configured local::lib to install CPAN modules somewhere in to
Packit dc272c
    your home directory, and at some point later you try to install a module
Packit dc272c
    with "cpan -i Foo::Bar", but it fails with an error like: "Warning: You
Packit dc272c
    do not have permissions to install into
Packit dc272c
    /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux at
Packit dc272c
    /usr/lib64/perl5/5.8.8/Foo/Bar.pm" and buried within the install log is
Packit dc272c
    an error saying "'INSTALL_BASE' is not a known MakeMaker parameter
Packit dc272c
    name", then you've somehow lost your updated ExtUtils::MakeMaker module.
Packit dc272c
Packit dc272c
    To remedy this situation, rerun the bootstrapping procedure documented
Packit dc272c
    above.
Packit dc272c
Packit dc272c
    Then, run "rm -r ~/.cpan/build/Foo-Bar*"
Packit dc272c
Packit dc272c
    Finally, re-run "cpan -i Foo::Bar" and it should install without
Packit dc272c
    problems.
Packit dc272c
Packit dc272c
ENVIRONMENT
Packit dc272c
    SHELL
Packit dc272c
    COMSPEC
Packit dc272c
        local::lib looks at the user's "SHELL" environment variable when
Packit dc272c
        printing out commands to add to the shell configuration file.
Packit dc272c
Packit dc272c
        On Win32 systems, "COMSPEC" is also examined.
Packit dc272c
Packit dc272c
SEE ALSO
Packit dc272c
    *   Perl Advent article, 2011
Packit dc272c
        <http://perladvent.org/2011/2011-12-01.html>
Packit dc272c
Packit dc272c
SUPPORT
Packit dc272c
    IRC:
Packit dc272c
Packit dc272c
        Join #toolchain on irc.perl.org.
Packit dc272c
Packit dc272c
AUTHOR
Packit dc272c
    Matt S Trout <mst@shadowcat.co.uk> http://www.shadowcat.co.uk/
Packit dc272c
Packit dc272c
    auto_install fixes kindly sponsored by http://www.takkle.com/
Packit dc272c
Packit dc272c
CONTRIBUTORS
Packit dc272c
    Patches to correctly output commands for csh style shells, as well as
Packit dc272c
    some documentation additions, contributed by Christopher Nehren
Packit dc272c
    <apeiron@cpan.org>.
Packit dc272c
Packit dc272c
    Doc patches for a custom local::lib directory, more cleanups in the
Packit dc272c
    english documentation and a german documentation contributed by Torsten
Packit dc272c
    Raudssus <torsten@raudssus.de>.
Packit dc272c
Packit dc272c
    Hans Dieter Pearcey <hdp@cpan.org> sent in some additional tests for
Packit dc272c
    ensuring things will install properly, submitted a fix for the bug
Packit dc272c
    causing problems with writing Makefiles during bootstrapping,
Packit dc272c
    contributed an example program, and submitted yet another fix to ensure
Packit dc272c
    that local::lib can install and bootstrap properly. Many, many thanks!
Packit dc272c
Packit dc272c
    pattern of Freenode IRC contributed the beginnings of the
Packit dc272c
    Troubleshooting section. Many thanks!
Packit dc272c
Packit dc272c
    Patch to add Win32 support contributed by Curtis Jewell
Packit dc272c
    <csjewell@cpan.org>.
Packit dc272c
Packit dc272c
    Warnings for missing PATH/PERL5LIB (as when not running interactively)
Packit dc272c
    silenced by a patch from Marco Emilio Poleggi.
Packit dc272c
Packit dc272c
    Mark Stosberg <mark@summersault.com> provided the code for the now
Packit dc272c
    deleted '--self-contained' option.
Packit dc272c
Packit dc272c
    Documentation patches to make win32 usage clearer by David Mertens
Packit dc272c
    <dcmertens.perl@gmail.com> (run4flat).
Packit dc272c
Packit dc272c
    Brazilian portuguese translation and minor doc patches contributed by
Packit dc272c
    Breno G. de Oliveira <garu@cpan.org>.
Packit dc272c
Packit dc272c
    Improvements to stacking multiple local::lib dirs and removing them from
Packit dc272c
    the environment later on contributed by Andrew Rodland
Packit dc272c
    <arodland@cpan.org>.
Packit dc272c
Packit dc272c
    Patch for Carp version mismatch contributed by Hakim Cassimally
Packit dc272c
    <osfameron@cpan.org>.
Packit dc272c
Packit dc272c
    Rewrite of internals and numerous bug fixes and added features
Packit dc272c
    contributed by Graham Knop <haarg@haarg.org>.
Packit dc272c
Packit dc272c
COPYRIGHT
Packit dc272c
    Copyright (c) 2007 - 2013 the local::lib "AUTHOR" and "CONTRIBUTORS" as
Packit dc272c
    listed above.
Packit dc272c
Packit dc272c
LICENSE
Packit dc272c
    This is free software; you can redistribute it and/or modify it under
Packit dc272c
    the same terms as the Perl 5 programming language system itself.
Packit dc272c