Skip Menu |

This queue is for tickets about the Module-CPANTS-Analyse CPAN distribution.

Report information
The Basics
Id: 88969
Status: open
Priority: 0/
Queue: Module-CPANTS-Analyse

People
Owner: Nobody in particular
Requestors: ether [...] cpan.org
Cc:
AdminCc:

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



Subject: prereq_matches_use should ignore statements in strings and __DATA__ sections
This has long been an issue of Module::ExtractUse (see https://rt.cpan.org/Ticket/Display.html?id=31934). I'm not inclined to use PPI-based tools like Perl::PrereqScanner as they are too slow (to parse the whole BackPAN) at the moment. Recently there are two faster alternatives to PPI, and when they become more stable and reliable (one is only for 5.18.1, and one has a memory issue), I may write something with them to replace Module::ExtractUse. Anyway, I think __(DATA|END)__ section can be ignored soonish. Thanks. On Thu Sep 26 05:28:40 2013, ETHER wrote: Show quoted text
> Code in strings and data sections, which are used to create code to be > used elsewhere, should not be scanned for 'use' statements, as they do > not apply in this context. > > examples: > http://cpants.cpanauthors.org/dist/Dist-Zilla-Plugin-MakeMaker- > Awesome/errors > https://metacpan.org/source/ETHER/Dist-Zilla-Plugin-MakeMaker-Awesome- > 0.16/lib/Dist/Zilla/Plugin/MakeMaker/Awesome.pm#L235 > > http://cpants.cpanauthors.org/dist/Dist-Zilla-Plugin-Test- > CheckDeps/errors > https://metacpan.org/source/ETHER/Dist-Zilla-Plugin-Test-CheckDeps- > 0.008/lib/Dist/Zilla/Plugin/Test/CheckDeps.pm#L126
On Thu Sep 26 12:04:19 2013, ISHIGAKI wrote: Show quoted text
> This has long been an issue of Module::ExtractUse (see > https://rt.cpan.org/Ticket/Display.html?id=31934). > > I'm not inclined to use PPI-based tools like Perl::PrereqScanner as > they are too slow (to parse the whole BackPAN) at the moment. Recently > there are two faster alternatives to PPI, and when they become more > stable and reliable (one is only for 5.18.1, and one has a memory > issue), I may write something with them to replace Module::ExtractUse. > > Anyway, I think __(DATA|END)__ section can be ignored soonish. Thanks.
https://github.com/domm/Module-ExtractUse/commit/1246e1f05a64f305adf9a154d020954b38c00caf Show quoted text
> > On Thu Sep 26 05:28:40 2013, ETHER wrote:
> > Code in strings and data sections, which are used to create code to > > be > > used elsewhere, should not be scanned for 'use' statements, as they > > do > > not apply in this context. > > > > examples: > > http://cpants.cpanauthors.org/dist/Dist-Zilla-Plugin-MakeMaker- > > Awesome/errors > > https://metacpan.org/source/ETHER/Dist-Zilla-Plugin-MakeMaker- > > Awesome- > > 0.16/lib/Dist/Zilla/Plugin/MakeMaker/Awesome.pm#L235 > > > > http://cpants.cpanauthors.org/dist/Dist-Zilla-Plugin-Test- > > CheckDeps/errors > > https://metacpan.org/source/ETHER/Dist-Zilla-Plugin-Test-CheckDeps- > > 0.008/lib/Dist/Zilla/Plugin/Test/CheckDeps.pm#L126
This has been fixed since Module::ExtractUse 0.33 (though it's marked as unauthorized). On Thu Sep 26 12:20:07 2013, ISHIGAKI wrote: Show quoted text
> On Thu Sep 26 12:04:19 2013, ISHIGAKI wrote:
> > This has long been an issue of Module::ExtractUse (see > > https://rt.cpan.org/Ticket/Display.html?id=31934). > > > > I'm not inclined to use PPI-based tools like Perl::PrereqScanner as > > they are too slow (to parse the whole BackPAN) at the moment. > > Recently > > there are two faster alternatives to PPI, and when they become more > > stable and reliable (one is only for 5.18.1, and one has a memory > > issue), I may write something with them to replace > > Module::ExtractUse. > > > > Anyway, I think __(DATA|END)__ section can be ignored soonish. > > Thanks.
> > https://github.com/domm/Module- > ExtractUse/commit/1246e1f05a64f305adf9a154d020954b38c00caf >
> > > > On Thu Sep 26 05:28:40 2013, ETHER wrote:
> > > Code in strings and data sections, which are used to create code to > > > be > > > used elsewhere, should not be scanned for 'use' statements, as they > > > do > > > not apply in this context. > > > > > > examples: > > > http://cpants.cpanauthors.org/dist/Dist-Zilla-Plugin-MakeMaker- > > > Awesome/errors > > > https://metacpan.org/source/ETHER/Dist-Zilla-Plugin-MakeMaker- > > > Awesome- > > > 0.16/lib/Dist/Zilla/Plugin/MakeMaker/Awesome.pm#L235 > > > > > > http://cpants.cpanauthors.org/dist/Dist-Zilla-Plugin-Test- > > > CheckDeps/errors > > > https://metacpan.org/source/ETHER/Dist-Zilla-Plugin-Test-CheckDeps- > > > 0.008/lib/Dist/Zilla/Plugin/Test/CheckDeps.pm#L126
On 2014-06-28 23:46:09, ISHIGAKI wrote: Show quoted text
> This has been fixed since Module::ExtractUse 0.33 (though it's marked > as unauthorized).
Is this fix deployed yet? I see the problem still occurring, e.g. http://cpants.cpanauthors.org/dist/Dist-Zilla-Plugin-Test-CleanNamespaces/errors
On Tue Jul 01 03:54:08 2014, ETHER wrote: Show quoted text
> On 2014-06-28 23:46:09, ISHIGAKI wrote:
> > This has been fixed since Module::ExtractUse 0.33 (though it's marked > > as unauthorized).
> > Is this fix deployed yet? I see the problem still occurring, e.g. > http://cpants.cpanauthors.org/dist/Dist-Zilla-Plugin-Test- > CleanNamespaces/errors
Ugh, here document... OK. We eventually need to use a better scanner that actually parses code and does that fast enough.