tsee / extutils-cppguess

Guess the C++ compiler for Perl modules
6 stars 9 forks source link

Should be testable by mocking %Config #4

Closed daoswald closed 5 years ago

daoswald commented 10 years ago

This is being worked on in the "tests" branch:

We should be able to pass a mock %Config to the constructor so that it becomes easier to test logic for various platforms. In particular, 'osname', 'cc', 'osvers', 'gccvers' are probably relevant parts of the %Config hash. Testability is hampered to a degree by the logic that uses system calls, but at least being able to mock %Config as an official part of the UI is a step in the right direction.

Leont commented 10 years ago

Two notable existing approaches to this problem are ExtUtils::MakeMaker::Config and ExtUtils::Config

mohawk2 commented 5 years ago

This is now in place, with the EUMM approach. It is also possible to pass a config arg to new.