On Wed May 20 13:20:22 2015, WPMOORE wrote:
Show quoted text> I got 0.820820 to pass it's test suite, but it required forcing
> B-Hooks-EndOfScope to compile with Variable-Magic.
>
> This is a case where it seems you have a subtle dependency upon
> Variable-Magic, simply because if Variable-Magic isn't installed, then
> B-Hooks-EndOfScope won't work for you.
This is not the case. Please read the explanation carefully:
https://github.com/dbsrgits/dbix-class/blob/current/blead/t/52leaks.t#L449-L455
This triggers because the test in question is hardly doing regular stuff:
https://github.com/dbsrgits/dbix-class/blob/current/blead/t/52leaks.t#L65-L87
Show quoted text> I doubt anyone else will see
> this
> problem, since B-H-EofS actually declares V::M as a required
> dependency
> dynamically (in MYMETA.json, generated by Makefile.PL), and my build
> system
> got fooled by the fact that the static definition (the META.json in
> the
> distro) is a recommends.
We have been over this - META.* is (at best) a a minimal set of what you may need. There are many modules that do this "extra deps at config time" dance to give you more "ooompf". Among the deps of DBIC alone you have (this is off the top of my head, there are certainly others, and the list changes all the time):
https://metacpan.org/source/HAARG/Devel-GlobalDestruction-0.13/Makefile.PL#L40
https://metacpan.org/source/DOY/Package-Stash-0.37/Makefile.PL#L87
https://metacpan.org/source/RIBASUSHI/Class-Accessor-Grouped-0.10012/Makefile.PL#L24
https://metacpan.org/source/ETHER/B-Hooks-EndOfScope-0.15/Makefile.PL#L56
Show quoted text> What happens is that even if the required
> dependency is NOT installed, then B-H-EofS actually still builds, but
> it
> builds the pure-perl version, not the XS version. That is, the
> code
> itself actually treats V::M as a recommends, since it will compile
> fine
> without it. It's the difference in behavior between the PP and XS
> versions
> that triggers the failed test suite in YOUR code. If it's PP, you
> get
> the error. If it's XS, it passes.
Correct, and only on PP with 5.10+. B::Hooks::EndOfScope has 3(!) modes of operation:
via Variable::Magic
via
https://metacpan.org/source/ETHER/B-Hooks-EndOfScope-0.15/lib/B/Hooks/EndOfScope/PP/HintHash.pm
or via
https://metacpan.org/source/ETHER/B-Hooks-EndOfScope-0.15/lib/B/Hooks/EndOfScope/PP/FieldHash.pm
Show quoted text> IM!HO, this is a bug in the way B-H-EofS is built, but no one will
> ever
> listen to a bug report about it -- if you declare something as
> required,
> and it isn't present, then your module should NOT build, test and
> install
> without error.
Given I (personally) am the one who wrote the 3-prong system - I am listening. However I am not sure how I can provide the idempotence of "works in any case", while at the same keeping things static. I am also a little confused by your claim "should NOT build, test and install without error". The module is an abstraction. It has a test suite. This test suite is fulfilled by differently operating machinery depending on circumstances.
Isn't this the very definition of library...? :)
Show quoted text> This is what I get for creating my own perl build infrastructure -- I
> get
> to stumble into weird edge conditions like this. Now I check for and
> handle the case where a single dependency might be declared as BOTH
> recommends and required.
See the other links higher up - often times recommends() is *not* declared at all. It is the configure-time decision that matters in the end.
Bottom line (as I've told you previously) is that unless dynamic_config is explicitly set to 0, you can not fully trust META.* which is nothing more than advisory. It is as simple as that.