Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Generating SVG Badges with Perl

by haukex (Chancellor)
on Nov 10, 2018 at 14:20 UTC ( #1225536=CUFP: print w/replies, xml ) Need Help??

If you've looked at projects on GitHub or other sites, you may have noticed the little rectangular badges (aka shields) saying things like "build passing" with a nice green background (or yellow/red if something is wrong), and if you've used Travis CI or Coveralls, you probably know how to get these badges. There is also a nice service that can generate these badges for you,, which is written in JavaScript.

There didn't seem to be anything like that for Perl, so I wrote Badge::Simple!

Thanks to a super quick turnaround by Kenichi Ishigaki, these badges are already integrated into CPANTS: Try accessing or and you should see a badge for your Kwalitee score (PNG badges have also been available for quite some time, just use .png instead of .svg).

In the respository, you can find the script, which you can use to generate CPAN Testers badges for your CPAN modules. There is an open issue to perhaps integrate this directly with CPAN Testers, if anyone would like to take a stab at that, please feel free :-)

You can see all this in action, for example, in the Badge-Simple readme: the "Kwalitee" and "CPAN Testers" badges were generated with Perl!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: CUFP [id://1225536]
Front-paged by stevieb
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2020-06-01 06:43 GMT
Find Nodes?
    Voting Booth?

    No recent polls found