Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Non-standard Perl Module Locations



On 13/03/2008, Curt Sampson <cjs@example.com> wrote:
>
>     BEGIN {
>         require File::Basename;
>         require(File::Basename::dirname($0) . "/../qam.pl");
>         }
>
>  (I'd like to make this smaller, if anybody has any good ideas.)

To be shorter and more reliable try:

        use FindBin qw($Bin);
        use lib "$Bin/../lib";

You don't need the BEGIN block then.  See perldoc FindBin for more
info.  It's part of the core.

-- 
Marty


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links