Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

$Foo::VERSION notation causes faliure of "version in each file" test. #10

Closed
kentfredric opened this Issue · 3 comments

3 participants

@kentfredric

I've started using v5.14+ style in a few non-critial dists to smoke out bugs related to new syntax in toolchain:

package Foo { 
{
    $Foo::VERSION = '0.001';
}

}

syntax appears to cause "has_version_in_each_file" to fail, despite declaring a version in each file:

http://cpants.cpanauthors.org/dist/Net-Minecraft-Login/errors

has_version_in_each_file    ["lib/Net/Minecraft/LoginFailure.pm","lib/Net/Minecraft/Login.pm","lib/Net/Minecraft/LoginResult.pm"]

https://metacpan.org/source/KENTNL/Net-Minecraft-Login-0.001000/lib/Net/Minecraft/Login.pm#L10

https://metacpan.org/source/KENTNL/Net-Minecraft-Login-0.001000/lib/Net/Minecraft/LoginFailure.pm#L10

https://metacpan.org/source/KENTNL/Net-Minecraft-Login-0.001000/lib/Net/Minecraft/LoginResult.pm#L10

The PAUSE indexer itself doesn't presently support this syntax either, although its slated for addition sometime soon, but I don't have a problem there because I use metadata based indexing:

https://metacpan.org/source/KENTNL/Net-Minecraft-Login-0.001000/META.json#L65

Note:

There is an additional form also supported by Perl Itself that nothing else seems to support yet,

package Foo v0.1.0 { 

}

Style notation, so you may want to add support for that at the same time, but I however haven't started testing this syntax yet =)

@kentfredric

Oh, I just discovered this error is more widespread and it can't even detect

package Bar;
{
    $Bar::VERSION = 
}

Style assignment. :( Going to open a respective bug in MCA

@kentfredric kentfredric referenced this issue in daxim/Module-CPANTS-Analyse
Open

per-file version assignment check too naive. #6

@karenetheridge

This should probably be filed in https://rt.cpan.org/Dist/Display.html?Queue=Module-CPANTS-Analyse, rather than in the queue for the website itself.

@charsbar
Owner

This was fixed in the following commits in Parse::PMFile (which is used in the CPANTS analyzer):

And also: https://github.com/charsbar/pause/commits/fix/package_version_wrong_brace (which has been merged in andk's master)

Thanks!

@charsbar charsbar closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.