Indeed, as you suggest I can put the RequestAgent.pm file into directory 'lib' and add "use lib 'lib';" to Client.pm prior to "use RequestAgent;".
This works as desired when I use the -Mblib command line argument to tell Perl where to find my libraries, if I the "use lib" directive in Client.pm contains a path for 'lib' which is relative to the directory specified by -Mblib. This is good.
But when I try to run "make test" from the lib/My/Client directory, I find that I get the following error:
*unless* I either:Can't locate RequestAgent.pm in @INC (@INC contains: lib blib/arch bli +b/lib /usr/lib/perl5/5.6.1/i386-linux ...(snip snip)... .) at blib/li +b/My/Client.pm line 18.
But this seems lame, since in order to properly maintain both packages in the same directory I'll need to manually hack the local Makefile - or become enough of a MakeMaker guru that I can intelligently hack the upstream Makefile.PL instead.
Am I missing another option (perhaps something more obvious) here? Again, my goal here is simply to cleanly override the LWP credentials handler.
In reply to Re^2: How to define a package using a tweaked version of LWP::UserAgent?
by pwolfenden
in thread How to define a package using a tweaked version of LWP::UserAgent?
by pwolfenden
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |