in reply to How to define a package using a tweaked version of LWP::UserAgent?

It shouldn't be a problem to 'use' your package:
use lib '/absolute_path_to_RequestAgent';
or
use lib $FindBin::RealBin.'/relative_path_to_RequestAgent';

Replies are listed 'Best First'.
Re^2: How to define a package using a tweaked version of LWP::UserAgent?
by pwolfenden (Novice) on Jul 31, 2008 at 16:29 UTC

    Re the $FindBin::RealBin idea: since the My::Client package is for use by clients on client machines we can't assume anything about the location of the running script in the filesystem. So unfortunately we cannot express the path to my package file relative to $FindBin::RealBin. And hardcoded paths are out of the question, since the My::Client package may have been installed anywhere.

    I think we can safely assume that it is the responsibility of the author of any script which uses the My::Client package to tweak the @INC array (whether via "use lib", -Mblib on the command line, etc.) so that the Client.pm file can be found. But once this has been done IMO it should be the responsibility of the My::Client package to include the My::RequestAgent package.