in reply to apache2 passing PERL5LIB environment to cgi

use lib ... would appear to be the correct approach here.

Have you verified that the apache user had the rights to read your ~/lib directory?