Re: [Module::Build] problem with programmatic control of multiple builds
Status: Beta
Brought to you by:
kwilliams
|
From: Ken W. <ke...@ma...> - 2006-06-03 17:14:48
|
Hi Ray,
I think you're probably correct on all counts. I don't like that
information being class data either, I'm hoping we can migrate it to
instance data sometime. Certainly the use case you posted should be
supported.
As a workaround, you could probably do "delete $INC{"Module/Build/
Base.pm"}; require Module::Build::Base;" each time through the loop.
-Ken
On Jun 2, 2006, at 8:56 AM, Ray Zimmerman wrote:
> I have an automated build, test and install process for a collection
> of in-house Perl packages* using a straightforward procedure which is
> basically ...
>
> foreach my $dist ( @dist_list ) {
> my $dir = File::Spec->join('my_build_dir', $dist);
> chdir $dir or die "could not change to $dir";
>
> $p = { <some build options> };
>
> my $b = Module::Build->new_from_context( %$p );
> $b->dispatch('build');
> $b->dispatch('test');
> $b->dispatch('install');
> }
>
> I ran into a problem when attempting to convert everything from using
> a slightly modified version of M::B 0.2608 to M::B 0.2801. The
> problem I am encountering has to do with the fact that $b-
>> build_elements appears to be cumulative in the above loop, even
> though $b is being recreated. That is, if one of the Build.PL files
> has ...
>
> $b->add_build_element('foo');
>
> ... then all subsequent $dist's in the above loop will attempt to
> build foo elements even though the corresponding Build.PL does not
> mention foo anywhere.
>
> I believe the %valid_properties closure in
> Module::Build::Base::ACTION_config_data is the culprit. Is this a
> bug? Shouldn't the list of build_elements (all config data, in fact)
> be an object property as opposed to class data?
>
> Any suggestions for a workaround to start over with a completely
> fresh, clean M::B at the beginning of each loop?
>
> Thanks,
> - Ray
>
> * Consisting of a base package A and add-on packages B, as described
> in yesterday's post "M::B subclass .pm file locations".
>
>
> _______________________________________________
> Module-build-general mailing list
> Mod...@li...
> https://lists.sourceforge.net/lists/listinfo/module-build-general
|