| 1 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | |||
| 4 | package Badge::Depot::Plugin::Gratipay; | ||
| 5 | |||
| 6 | 2 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 2 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 2 | ▶ | use Types::Standard qw/Str/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | 2 | ▶ | use Types::URI qw/Uri/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | 2 | with 'Badge::Depot'; | |
| 11 | |||
| 12 | 2 | our $VERSION = '0.0103'; | |
| 13 | # ABSTRACT: Gratipay plugin for Badge::Depot (deprecated) | ||
| 14 | 2 | our $AUTHORITY = 'cpan:CSSON'; # AUTHORITY | |
| 15 | |||
| 16 | 2 | has user => ( | |
| 17 | is => 'ro', | ||
| 18 | isa => Str, | ||
| 19 | required => 1, | ||
| 20 | ); | ||
| 21 | 2 | has custom_image_url => ( | |
| 22 | is => 'ro', | ||
| 23 | isa => Uri, | ||
| 24 | coerce => 1, | ||
| 25 | default => 'https://img.shields.io/gratipay/%s.svg', | ||
| 26 | ); | ||
| 27 | |||
| 28 | |||
| 29 | 2 | ▶ | sub BUILD { |
|
Subroutine
BUILD: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 30 | 2 | my $self = shift; | |
| 31 | 2 | $self->link_url(sprintf 'https://gratipay.com/%s', $self->user); | |
| 32 | 2 | $self->image_url(sprintf $self->custom_image_url, $self->user); | |
| 33 | 2 | $self->image_alt('Gratipay'); | |
| 34 | } | ||
| 35 | |||
| 36 | 2 | 1; | |
| 37 | |||
| 38 | __END__ | ||