Sorry if this is too obvious, but, although you say you've set PERL5LIB, have you exported it? Without this step [export], the/any variable is available only to the current process i.e. not to any sub-process(es) thereof e.g. perlgcc ... whatever that may be.
A user level that continues to overstate my experience :-))