in reply to Re: How to define a package using a tweaked version of LWP::UserAgent?
in thread How to define a package using a tweaked version of LWP::UserAgent?
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How to define a package using a tweaked version of LWP::UserAgent?
by moritz (Cardinal) on Jul 31, 2008 at 16:08 UTC | |
by pwolfenden (Novice) on Jul 31, 2008 at 16:40 UTC | |
by moritz (Cardinal) on Jul 31, 2008 at 16:50 UTC | |
by pwolfenden (Novice) on Jul 31, 2008 at 17:27 UTC |