saintex has asked for the wisdom of the Perl Monks concerning the following question:

How can I do that?

I tried with:
use FindBin; use lib "$FindBin::Bin/../";

But it doesn't works.

Replies are listed 'Best First'.
Re: Use a package in parent directory
by almut (Canon) on Jun 05, 2010 at 08:33 UTC

    Works fine for me.  So, could you show your exact paths where the module/script resides, and how you call the script that tries to use the module?  Also, maybe print out the value of $FindBin::Bin.

Re: Use a package in parent directory
by ahmad (Hermit) on Jun 05, 2010 at 11:43 UTC

    You can push that parent dir in @INC in a begin block and use it.

    BEGIN { push @INC, "../" } # then use package;
Re: Use a package in parent directory
by ikegami (Patriarch) on Jun 05, 2010 at 16:26 UTC
    Define "doesn't work". What error do you get?