perl-lib-relative - Add paths relative to the current file to @INC

Property Value
Distribution ALT Linux Sisyphus
Repository Autoimports noarch
Package name perl-lib-relative
Package version 0.002
Package release alt1
Package architecture noarch
Package type rpm
Installed size 18.89 KB
Download size 18.89 KB
Official Mirror
Adding a path to @INC to load modules from a local directory
may seem simple, but has a few common pitfalls to be aware of. Directly adding
a relative path to `@INC' means that any later code that changes the current
working directory will change where modules are loaded from. This applies to
the `.' path that used to be in `@INC' by default until perl 5.26.0, or a
relative path added in code like `use lib 'path/to/lib'', and may be a
vulnerability if such a location is not supposed to be writable. Additionally,
the commonly used the FindBin manpage module relies on interpreter state and the path to
the original script invoked by the perl interpreter, sometimes requiring
workarounds in uncommon cases like generated or embedded code. This module
proposes a more straightforward method: take a path relative to the
current file, absolutize it, and add it to
If this module is already available to be loaded, it can be used as with
the lib, passing relative paths, which will be absolutized relative to the
current file then passed on to the lib manpage. Multiple arguments will be separately
absolutized, and absolute paths will be passed on unchanged.
For cases where this module cannot be loaded beforehand, the last section of
the the section on "SYNOPSIS" can be copy-pasted into a file to perform the same task.


Package Version Architecture Repository
perl-lib-relative - - -


Name Value
/usr/share/perl5 -
perl(File/ -
perl(File/ -
perl( -
rpmlib(PayloadIsLzma) -


Name Value
perl(lib/ = 0.002
perl-lib-relative = 0.002-alt1


Type URL
Binary Package perl-lib-relative-0.002-alt1.noarch.rpm
Source Package perl-lib-relative-0.002-alt1.src.rpm

Install Howto

  1. Add the following line to /etc/apt/sources.list:
    rpm [Sisyphus] noarch autoimports
    rpm [Sisyphus] noarch autoimports
  2. Update the package index:
    # sudo apt-get update
  3. Install perl-lib-relative rpm package:
    # sudo apt-get install perl-lib-relative



See Also

Package Description
perl-lib-require-all-0.01-alt1.noarch.rpm A tiny pragma to load all files from a lib directory
perl-lib-restrict-0.0.5-alt1.noarch.rpm perl module lib-restrict
perl-lib-tiny-0.7-alt1.noarch.rpm use lib, without having to use memory by loading Config
perl-lib-vendor-0.14.163-alt1.noarch.rpm add vendor libraries to the module search path
perl-lib-xi-1.01-alt1.noarch.rpm Installs missing modules on demand
perl-libalarm-1.0-alt1.noarch.rpm perl module libalarm
perl-libsirc-0.12-alt1.noarch.rpm perl module libsirc
perl-libwhisker2-2.5-alt1_22.noarch.rpm Perl module geared specifically for HTTP testing
perl-libwhisker2-doc-2.5-alt1_22.noarch.rpm Development documentation for perl-libwhisker2
perl-like-0.02-alt1.noarch.rpm Declare support for an interface
perl-load-0.23-alt1.noarch.rpm load - control when subroutines will be loaded
perl-local-c-0.001-alt1.noarch.rpm Installing C libraries in userspace [HIGHLY EXPERIMENTAL]
perl-local-c-scripts-0.001-alt1.noarch.rpm local-c scripts
perl-local-lib-deps-0.09-alt1.noarch.rpm This module uses local::lib to allow applications to maintain a private path of dependancy modules
perl-local-lib-deps-testmodule-0.01-alt1.noarch.rpm This module is for testing lib-local-deps