Skip Menu |

This queue is for tickets about the Test-Compile CPAN distribution.

Report information
The Basics
Id: 103479
Status: resolved
Priority: 0/
Queue: Test-Compile

People
Owner: Nobody in particular
Requestors: evan [...] catalyst-au.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: v2.2.2



Subject: Replace 'import()' with 'Exporter'
Date: Mon, 13 Apr 2015 13:29:52 +1000
To: bug-Test-Compile [...] rt.cpan.org
From: Evan Giles <evan [...] catalyst-au.net>
See the pull request from LeHack on github: https://github.com/egiles/test-compile/pull/4 -- Evan Giles Catalyst IT Australia Pty Ltd Mobile: 0410 238325 evan@catalyst-au.net
Some thoughts. 1. The new test file depends on Test::Exception, which may add a dependency to the distribution 2. The change of usage is not backwards compatible - legacy users would now need to import the functions 3. I don't think we need to exclude .git directories - except perhaps for performance? 4. The use of 'use parent' requires perl 5.10.1 5. The extra else clause when a file is not found is great 6. The name of the test file '200-import_check.t' doesn't match the others If we go ahead and implement the not-backwards-compatible changes (point 2), we should add another note in the docs to make it clear(er) that the functions are deprecated.
On Mon Apr 27 00:04:12 2015, EGILES wrote: Show quoted text
> Some thoughts. > 1. The new test file depends on Test::Exception, which may add a > dependency to the distribution > 4. The use of 'use parent' requires perl 5.10.1
Points 1 and 4 are opposite sides of the same coin. We could either add them both as dependencies, or require perl 5.10.1 and they'll get dragged in with perl core. If we require 5.10.1, we could also remove the current dependency on 'version'. I understand Test::Compile is in use on some pretty crusty old servers, so I am unsure which option is best...
Hi Test::Compile now uses 'Exporter'. You patch has been incorporated. However, as soon as it was released (v2.0.0) a bug was raised pointing out that 90 modules are still depending on 'all_pm_files_ok()' being imported - see https://rt.cpan.org/Ticket/Display.html?id=129888, so it now (and for the foreseeable future) still exports a bunch of ugly functions. However, it still uses 'Exporter' which is good. Thanks for your assistance.