3 Feb 22:50
4 Feb 00:22
Re: Ending Build.PL if there are missing modules
Leon Timmermans <fawaka <at> gmail.com>
2012-02-03 23:22:13 GMT
2012-02-03 23:22:13 GMT
2012/2/3 Alberto Simões <albie <at> alfarrabio.di.uminho.pt>: > Hello > > Builder->new seems to check if all required modules are available. But if > any fails, it continues to process the Build.PL file. > > Is there any way to make it stop? > > Thanks Hi Alberto, You shouldn't make it stop. «perl Build.PL» does configuration, not building. Hence build or runtime requirements are not required to be satisfied. What you're observing is not an error in any way, but an essential step in the process. It gives the install tool the chance to tell the cpan client (or the end user, if he's installing by hand) the opportunity what dependencies to install. If there are any missing dependencies, you'll notice it soon enough (in particular when doing «./Build test». Leon
4 Feb 01:32
Re: Ending Build.PL if there are missing modules
Adam Kennedy <adamkennedybackup <at> gmail.com>
2012-02-04 00:32:29 GMT
2012-02-04 00:32:29 GMT
While I agree it needs to finish, I do kind of wish dependencies could be enforced at the build module level so that tests couldn't run until dependencies are satisfied. Adam On 4 February 2012 10:22, Leon Timmermans <fawaka <at> gmail.com> wrote: > 2012/2/3 Alberto Simões <albie <at> alfarrabio.di.uminho.pt>: >> Hello >> >> Builder->new seems to check if all required modules are available. But if >> any fails, it continues to process the Build.PL file. >> >> Is there any way to make it stop? >> >> Thanks > > Hi Alberto, > > You shouldn't make it stop. «perl Build.PL» does configuration, not > building. Hence build or runtime requirements are not required to be > satisfied. What you're observing is not an error in any way, but an > essential step in the process. It gives the install tool the chance to > tell the cpan client (or the end user, if he's installing by hand) the > opportunity what dependencies to install. > > If there are any missing dependencies, you'll notice it soon enough > (in particular when doing «./Build test». > > Leon(Continue reading)
4 Feb 02:33
Re: Ending Build.PL if there are missing modules
Michael G Schwern <schwern <at> pobox.com>
2012-02-04 01:33:29 GMT
2012-02-04 01:33:29 GMT
On 2012.2.3 3:22 PM, Leon Timmermans wrote: > You shouldn't make it stop. «perl Build.PL» does configuration, not > building. Hence build or runtime requirements are not required to be > satisfied. What you're observing is not an error in any way, but an > essential step in the process. It gives the install tool the chance to > tell the cpan client (or the end user, if he's installing by hand) the > opportunity what dependencies to install. MakeMaker has something like what Alberto wants, PREREQ_FATAL. It's considered a misfeature for exactly the reasons above. It doesn't let the configuration step complete so tools cannot resolve the dependencies and continue building. Alberto, what are you trying to accomplish here? There's probably a way to do it. -- -- emacs -- THAT'S NO EDITOR... IT'S AN OPERATING SYSTEM!
4 Feb 03:29
Re: Ending Build.PL if there are missing modules
Michael G Schwern <schwern <at> pobox.com>
2012-02-04 02:29:55 GMT
2012-02-04 02:29:55 GMT
On 2012.2.3 4:32 PM, Adam Kennedy wrote: > While I agree it needs to finish, I do kind of wish dependencies could > be enforced at the build module level so that tests couldn't run until > dependencies are satisfied. This should be enforced not by the build tool, which cannot resolve the dependencies itself, but by the tool running the install. And I mean both meanings of "tool". ;) -- -- Whip me, beat me, make my code compatible with VMS!
4 Feb 11:53
Re: Ending Build.PL if there are missing modules
Alberto Simões <albie <at> alfarrabio.di.uminho.pt>
2012-02-04 10:53:31 GMT
2012-02-04 10:53:31 GMT
Hello On 04/02/12 01:33, Michael G Schwern wrote: > On 2012.2.3 3:22 PM, Leon Timmermans wrote: >> You shouldn't make it stop. «perl Build.PL» does configuration, not >> building. Hence build or runtime requirements are not required to be >> satisfied. What you're observing is not an error in any way, but an >> essential step in the process. It gives the install tool the chance to >> tell the cpan client (or the end user, if he's installing by hand) the >> opportunity what dependencies to install. > > MakeMaker has something like what Alberto wants, PREREQ_FATAL. It's > considered a misfeature for exactly the reasons above. It doesn't let the > configuration step complete so tools cannot resolve the dependencies and > continue building. > > Alberto, what are you trying to accomplish here? There's probably a way to do it. Basically, I depend on Parse::Yapp, and I would like to call `yapp` on Build.PL so I can have the generated .pm file before M::B generates all its data dir. In fact, I can add that to inc/MyBuilder.pm, but I am afraid the generated .pm will not be installed. But probably I am just too used to MakeMaker and M::B will work just fine :) Cheers ambs(Continue reading)
4 Feb 12:56
Re: Ending Build.PL if there are missing modules
Leon Timmermans <fawaka <at> gmail.com>
2012-02-04 11:56:37 GMT
2012-02-04 11:56:37 GMT
2012/2/4 Alberto Simões <albie <at> alfarrabio.di.uminho.pt>: > Basically, I depend on Parse::Yapp, and I would like to call `yapp` on > Build.PL so I can have the generated .pm file before M::B generates all its > data dir. > > In fact, I can add that to inc/MyBuilder.pm, but I am afraid the generated > .pm will not be installed. > > But probably I am just too used to MakeMaker and M::B will work just fine :) There are two ways to do this. You can do this early enough during build, the PL_files feature would be the most obvious way. Alternatively you can add Parse::Yapp to configure requires (no need to add a check for that, it will die by itself if it's missing), but that will crap out on legacy perls without having any obvious advantages. Leon
4 Feb 13:48
Re: Ending Build.PL if there are missing modules
Leon Timmermans <fawaka <at> gmail.com>
2012-02-04 12:48:24 GMT
2012-02-04 12:48:24 GMT
On Sat, Feb 4, 2012 at 1:32 AM, Adam Kennedy <adamkennedybackup <at> gmail.com> wrote: > While I agree it needs to finish, I do kind of wish dependencies could > be enforced at the build module level so that tests couldn't run until > dependencies are satisfied. I tend to agree with that. I've been writting Test::CheckDeps (warning: very much a 0.001 release) to make it crap out as early as possible during testing, but it could be even earlier. Leon
4 Feb 14:31
Re: Ending Build.PL if there are missing modules
David Golden <xdaveg <at> gmail.com>
2012-02-04 13:31:28 GMT
2012-02-04 13:31:28 GMT
On Sat, Feb 4, 2012 at 7:48 AM, Leon Timmermans <fawaka <at> gmail.com> wrote: > On Sat, Feb 4, 2012 at 1:32 AM, Adam Kennedy > <adamkennedybackup <at> gmail.com> wrote: >> While I agree it needs to finish, I do kind of wish dependencies could >> be enforced at the build module level so that tests couldn't run until >> dependencies are satisfied. > > I tend to agree with that. I've been writting Test::CheckDeps > (warning: very much a 0.001 release) to make it crap out as early as > possible during testing, but it could be even earlier. Plenty of code has dependencies listed that aren't truly required and tests will pass with lower versions. The proper way to enforce dependencies is in a "use" statement: use Foo::Bar 1.23; Not coincidentally, that's how Dist::Zilla detects dependencies, ensuring that code and specified prereqs are actually in sync. In my view, other tools are doing it wrong. -- David
5 Feb 02:23
Re: Ending Build.PL if there are missing modules
David Golden <xdaveg <at> gmail.com>
2012-02-05 01:23:05 GMT
2012-02-05 01:23:05 GMT
On Sat, Feb 4, 2012 at 5:17 PM, Adam Kennedy <adam <at> ali.as> wrote: > That's how Module::Install's requires_from does it too. > > I should look at zilla's code and see how it runs, might be worth > aligning M:I and it's detection. It uses Ricardo's Perl::PrereqScanner, which does a pretty sane job of it (even detects base/parent and so on). It has some extensions for picking up Moose and POE prereqs and so on. It doesn't help with optional, dynamic prereqs so those have to be specified manually, but that's unavoidable I think. David
RSS Feed