FindBin-libs
view release on metacpan or search on metacpan
version/v5.14/lib/FindBin/libs.pm view on Meta::CPAN
{
my ( $libdir ) = $0 =~ m{ ^( .+? )/SOMEDIR/ }x;
eval "use lib qw( $libdir )";
}
This looks for a standard location (e.g., /path/to/Mylib)
in the executable path (or cwd) and uses that.
The main problem here is that if the anchor ever changes
(e.g., when moving code between projects or relocating
directories now that SVN supports it) the path often has
to change in multiple files. The regex also may have to
support multiple platforms, or be broken into more complicated
File::Spec code that probably looks pretty much like what
use FindBin::libs qw( base=Mylib )
does anyway.
=back
version/v5.28/lib/FindBin/libs.pm view on Meta::CPAN
{
my ( $libdir ) = $0 =~ m{ ^( .+? )/SOMEDIR/ }x;
eval "use lib qw( $libdir )";
}
This looks for a standard location (e.g., /path/to/Mylib)
in the executable path (or cwd) and uses that.
The main problem here is that if the anchor ever changes
(e.g., when moving code between projects or relocating
directories) the path often has
to change in multiple files. The regex also may have to
support multiple platforms, or be broken into more complicated
File::Spec code that probably looks pretty much like what
use FindBin::libs qw( base=Mylib )
does anyway.
=back
version/v5.40/lib/FindBin/libs.pm view on Meta::CPAN
{
my ( $libdir ) = $0 =~ m{ ^( .+? )/SOMEDIR/ }x;
eval "use lib qw( $libdir )";
}
This looks for a standard location (e.g., /path/to/Mylib)
in the executable path (or cwd) and uses that.
The main problem here is that if the anchor ever changes
(e.g., when moving code between projects or relocating
directories now that SVN supports it) the path often has
to change in multiple files. The regex also may have to
support multiple platforms, or be broken into more complicated
File::Spec code that probably looks pretty much like what
use FindBin::libs qw( base=Mylib )
does anyway.
=back
version/v5.8/lib/FindBin/libs.pm view on Meta::CPAN
{
my ( $libdir ) = $0 =~ m{ ^( .+? )/SOMEDIR/ }x;
eval "use lib qw( $libdir )";
}
This looks for a standard location (e.g., /path/to/Mylib)
in the executable path (or cwd) and uses that.
The main problem here is that if the anchor ever changes
(e.g., when moving code between projects or relocating
directories now that SVN supports it) the path often has
to change in multiple files. The regex also may have to
support multiple platforms, or be broken into more complicated
File::Spec code that probably looks pretty much like what
use FindBin::libs qw( base=Mylib )
does anyway.
=back
( run in 0.336 second using v1.01-cache-2.11-cpan-71847e10f99 )