Skip Menu |

This queue is for tickets about the Module-Build-Tiny CPAN distribution.

Report information
The Basics
Id: 87784
Status: resolved
Priority: 0/
Queue: Module-Build-Tiny

People
Owner: Nobody in particular
Requestors: jrcd83 [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: "Build.PL" options do not persistent for "./Build ..."
Date: Sun, 11 Aug 2013 20:14:20 -0400
To: bug-Module-Build-Tiny [...] rt.cpan.org
From: Justin Davis <jrcd83 [...] gmail.com>
I noticed a slight discrepancy between MB and MBT's behavior. MB behaves in the following way. Options given as command-line arguments or environment variables during the execution of Build.PL persist for each call of the generated Build script. The subsequent calls to Build (eg: ./Build build; ./Build install) behave as if they too were provided the same options that were provided to the Build.PL script earlier. MBT does not do any option checking or retention during the execution of Build.PL. Personally, I think the option specification in MB is more complicated than it needs to be. Nonetheless if your goal is to match MB's interface as much as possible I would recommend matching this behavior as well. The current differing behavior caused a surprise in a system I use for packaging modules. If you would like I could supply you with a patch. Would you like me to create a patch for this feature request? -juster
Subject: Re: [rt.cpan.org #87784] "Build.PL" options do not persistent for "./Build ..."
Date: Mon, 12 Aug 2013 10:40:25 +0300
To: bug-Module-Build-Tiny [...] rt.cpan.org
From: Leon Timmermans <leont [...] cpan.org>
On Mon, Aug 12, 2013 at 3:14 AM, Justin Davis via RT <bug-Module-Build-Tiny@rt.cpan.org> wrote: Show quoted text
> I noticed a slight discrepancy between MB and MBT's behavior. MB > behaves in the following way. Options given as command-line arguments > or environment variables during the execution of Build.PL persist for > each call of the generated Build script. The subsequent calls to Build > (eg: ./Build build; ./Build install) behave as if they too were > provided the same options that were provided to the Build.PL script > earlier. MBT does not do any option checking or retention during the > execution of Build.PL.
Module::Build::Tiny does retain configuration stage arguments. It doesn't interpret it until build time, but that shouldn't matter. Show quoted text
> Personally, I think the option specification in MB is more complicated > than it needs to be. Nonetheless if your goal is to match MB's > interface as much as possible I would recommend matching this behavior > as well. The current differing behavior caused a surprise in a system > I use for packaging modules.
Are you sure this is the cause of your problem, and not something else? Leon
Subject: Re: [rt.cpan.org #87784] "Build.PL" options do not persistent for "./Build ..."
Date: Mon, 12 Aug 2013 15:07:19 -0400
To: bug-Module-Build-Tiny [...] rt.cpan.org
From: Justin Davis <jrcd83 [...] gmail.com>
Oh yes, now I see the parts with the _build_params file. I'm not sure why that didn't click. I'm sorry! The problem I was having is that I have been using environment variables, which are also retained in MB, and not retained in MBT. On Mon, Aug 12, 2013 at 3:41 AM, Leon Timmermans via RT <bug-Module-Build-Tiny@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=87784 > > > On Mon, Aug 12, 2013 at 3:14 AM, Justin Davis via RT > <bug-Module-Build-Tiny@rt.cpan.org> wrote:
>> I noticed a slight discrepancy between MB and MBT's behavior. MB >> behaves in the following way. Options given as command-line arguments >> or environment variables during the execution of Build.PL persist for >> each call of the generated Build script. The subsequent calls to Build >> (eg: ./Build build; ./Build install) behave as if they too were >> provided the same options that were provided to the Build.PL script >> earlier. MBT does not do any option checking or retention during the >> execution of Build.PL.
> > Module::Build::Tiny does retain configuration stage arguments. It > doesn't interpret it until build time, but that shouldn't matter. >
>> Personally, I think the option specification in MB is more complicated >> than it needs to be. Nonetheless if your goal is to match MB's >> interface as much as possible I would recommend matching this behavior >> as well. The current differing behavior caused a surprise in a system >> I use for packaging modules.
> > Are you sure this is the cause of your problem, and not something else? > > Leon >
-- -Justin
Subject: Re: [rt.cpan.org #87784] "Build.PL" options do not persistent for "./Build ..."
Date: Tue, 13 Aug 2013 12:42:33 +0300
To: bug-Module-Build-Tiny [...] rt.cpan.org
From: Leon Timmermans <fawaka [...] gmail.com>
On Mon, Aug 12, 2013 at 10:07 PM, Justin Davis via RT <bug-Module-Build-Tiny@rt.cpan.org> wrote: Show quoted text
> Oh yes, now I see the parts with the _build_params file. I'm not sure > why that didn't click. I'm sorry! > > The problem I was having is that I have been using environment > variables, which are also retained in MB, and not retained in MBT.
MB is applying PERL_MB_OPT twice, once during «perl Build.PL» and once during the «./Build» stages. This is certainly the wrong thing. We have had a discussion about that in context of the Build.PL specification but didn't reach a firm conclusison, but what you're proposing would probably be the right thing (though I don't think you should have been changing the environmental variable mid-build in the first place) I'll probably change this in the next release. Leon P.S. What are you using for packaging that is causing these issues? I'm not aware of anything that does.
Subject: Re: [rt.cpan.org #87784] "Build.PL" options do not persistent for "./Build ..."
Date: Tue, 13 Aug 2013 09:06:19 -0400
To: bug-Module-Build-Tiny [...] rt.cpan.org
From: Justin Davis <jrcd83 [...] gmail.com>
I certainly find the environment variable handling kludgey but whether or not it is "wrong" depends on your definition of "right." If a minimalist and transparent design is "right" then I would certainly agree with you. CPANPLUS::Dist::Arch is a module I created for automatically packaging CPAN modules into ArchLinux packages as they are installed. The reason the environment variables change is because each stage of the packaging is run in a distinct sub-shell. This means "perl Build.PL", "./Build build", and "./Build install" are all called in a separate sub-shell. After "Build.PL" is called there is no longer any environment variable set. The decision to use environment variables instead of command line arguments was purely an aesthetic one. I liked having the options all set in one location instead of spread across the packaging stages. Another advantage is that this prevents env vars set by users (or perlbrew) from leaking in and changing the behavior of the build process. The build process should hopefully be building modules for use system-wide and act the same for everyone. The following is a PKGBUILD generated automatically that uses env vars. This is essentially a fancy bash script which is sourced by another script that specifies how to build the perl-libwww package. https://projects.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/perl-libwww&id=3d7b38be80fad5d5292b986a1453f209c838d3cb Thank you for your time and your hard work on this module and all the many others. On Tue, Aug 13, 2013 at 5:43 AM, Leon Timmermans via RT <bug-Module-Build-Tiny@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=87784 > > > On Mon, Aug 12, 2013 at 10:07 PM, Justin Davis via RT > <bug-Module-Build-Tiny@rt.cpan.org> wrote:
>> Oh yes, now I see the parts with the _build_params file. I'm not sure >> why that didn't click. I'm sorry! >> >> The problem I was having is that I have been using environment >> variables, which are also retained in MB, and not retained in MBT.
> > MB is applying PERL_MB_OPT twice, once during «perl Build.PL» and once > during the «./Build» stages. This is certainly the wrong thing. We > have had a discussion about that in context of the Build.PL > specification but didn't reach a firm conclusison, but what you're > proposing would probably be the right thing (though I don't think you > should have been changing the environmental variable mid-build in the > first place) > > I'll probably change this in the next release. > > Leon > > P.S. What are you using for packaging that is causing these issues? > I'm not aware of anything that does. >
-- -Justin
On Mon Aug 12 15:07:35 2013, jrcd83@gmail.com wrote: Show quoted text
> Oh yes, now I see the parts with the _build_params file. I'm not sure > why that didn't click. I'm sorry! > > The problem I was having is that I have been using environment > variables, which are also retained in MB, and not retained in MBT. >
This problem is fixed in Module::Build::Tiny 0.026. Leon