So, the only differences are FindBin itself and Exporter::Heavy. Your attempt to avoid Cwd, Carp, and Config are not avoided in the slightest.$ cat <<END >in-yours use File::Spec; use File::Basename; use lib &dirname(File::Spec->rel2abs($0)); print "$_\n" for sort keys %INC; END $ perl in-yours >out-yours $ cat <<END >in-mine use FindBin qw($Bin); use lib $Bin; print "$_\n" for sort keys %INC; END $ perl in-mine >out-mine $ comm out-yours out-mine Carp.pm Config.pm Cwd.pm Exporter.pm Exporter/Heavy.pm File/Basename.pm File/Spec.pm File/Spec/Unix.pm FindBin.pm XSLoader.pm attributes.pm base.pm lib.pm re.pm strict.pm vars.pm warnings.pm warnings/register.pm $
So please, don't try to reinvent the wheel until you know what that wheel is doing.
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In reply to •Re: Re: •Re: Adding script location to include path
by merlyn
in thread Adding script location to include path
by Azhrarn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |