Re: How do I properly use resume() and pick up inc?

[email protected] (David Golden)
Newsgroups perl.module.build
Message-ID <[email protected]>
On Tue, Sep 22, 2009 at 4:44 PM, brian d foy <[email protected]> wrote:
> * In Module::Build::Base::resume(), it adds $config_dir/lib to @INC.
> Module::Build::Base::_construct() doesn't look like it does anything
> with @INC either, but then it doesn't look like the original @INC is
> stored in the config anyway.

I'm back at a real computer and able to look at the source.

You're right that M::B doesn't store things added to @INC in the
config and it really should. It assumes that any subclass is "on the
fly" in _build/lib rather than possibly in inc/.  I noticed this when
fixing a bunch of other config timing bugs relating to install
directories but never got back to it.

Currently, you probably need to do this:

  use lib 'inc';
  my $mb = Module::Build->resume;

It wouldn't take much effort to save @INC additions in the config
somewhere and deal with them appropriately in resume().

I've created an RT ticket to track this issue:
https://rt.cpan.org/Ticket/Display.html?id=50145

Thank you for noticing and reporting this.

-- David
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.