I've used the Kwalitee and CPAN shields/badges in some of my GitHub/CPAN repositories for years. Recently, though, it seems the badges stopped working—for example, see Syntax::Construct: kwalitee doesn't display at all (but I can view the image directly), the CPAN badge shows the current version as ?.?.?.

My speculation is it's caused by some changes to CPAN and its infrastructure at the Perl Toolchain Summit this May.

Does anyone have any idea whom to ask?

See Re: VERSION section in POD for a previous mention of the shields in the Monastery.

The code I use to link to the shields:
<a href="https://metacpan.org/pod/Syntax::Construct"><img src="https:/ +/badge.fury.io/pl/Syntax-Construct.svg" alt="CPAN"></a> <a href="http://cpants.cpanauthors.org/dist/Syntax-Construct"><img src +="https://cpants.cpanauthors.org/dist/Syntax-Construct.png" alt="kwal +itee"></a>
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Replies are listed 'Best First'.
Re: Perl Shields/Badges
by hippo (Chancellor) on Jun 08, 2017 at 13:36 UTC

    It looks like github is doing something nasty to the image links. If I do View Image on the "kwalitee" link it gives a URL under https://camo.githubusercontent.com/ and error "Error Fetching Resource" (404). This sounds to me like github is replacing your image URLs with its own fetched-and-cached versions and their cache is duff. The real image at https://cpants.cpanauthors.org/dist/Syntax-Construct.png renders fine.

    So, I think this one might not be a problem at the CPANTS end.

      You might be right, at least partially. It seems GitHub started to cache images (coming both from http and https), and requires some headers to be specified to work properly. Maybe that's what's missing on CPAN's side? Aggressive image caching breaks image badges #224

      ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

        Yes, that's it and they are doing it on purpose. Personally I think that's a very poor decision by github.

        Since the origin image renders fine with a query string, maybe you could try https://cpants.cpanauthors.org/dist/Syntax-Construct.png?17-06-08 or similar to defeat the cache? Just bump the readme date when there's a new release.

Re: Perl Shields/Badges
by davorg (Chancellor) on Jun 11, 2017 at 11:01 UTC

    My guess is that badge.fury.io relies on the old MetaCPAN v0 API which was turned off a few days ago. They need to update their code to use the v1 API.

    Earlier this week I suggested a similar change to shields.io. See https://github.com/badges/shields/pull/1009.

    Update: Looks like they're fixed now:

    See here for example.

    --

    See the Copyright notice on my home node.

    Perl training courses

Re: Perl Shields/Badges
by choroba (Archbishop) on Jun 17, 2017 at 09:33 UTC
    Thanks davorg for reporting the problem to shields.io. In the end, I reported the problem with kwalitee to cpants tools and it's been fixed!

    ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,