| 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 | package App::Nopaste::Service::Mojopaste; | ||||||||||
| 4 | # ABSTRACT: Service provider for mojopaste | ||||||||||
| 5 | |||||||||||
| 6 | 2 | our $VERSION = '1.013'; | |||||||||
| 7 | |||||||||||
| 8 | 2 | ▶ | use parent 'App::Nopaste::Service'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | 1 | ▶ | sub uri { $ENV{NOPASTE_MOJOPASTE_WEBPATH} || 'https://ssl.thorsen.pm/paste' } | ||||||||
|
Subroutine
uri: called CC=2 SCAR=7.6
Pod
documented
Branch: 1 branch
| |||||||||||
| 11 | |||||||||||
| 12 | 0 | ▶ | sub fill_form { | ||||||||
|
Subroutine
fill_form: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 13 | 0 | my $self = shift; | |||||||||
| 14 | 0 | my $mech = shift; | |||||||||
| 15 | 0 | my %args = @_; | |||||||||
| 16 | |||||||||||
| 17 | # Hack around bot protection | ||||||||||
| 18 | 0 | my $form = $mech->form_number(1); | |||||||||
| 19 | 0 | my $action = $form->action; | |||||||||
| 20 | 0 | ▶ | if ($action =~ m{/invalid$}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 21 | 0 | $action =~ s{/invalid$}{}; | |||||||||
| 22 | 0 | $form->action($action); | |||||||||
| 23 | } | ||||||||||
| 24 | |||||||||||
| 25 | $mech->submit_form( | ||||||||||
| 26 | fields => { | ||||||||||
| 27 | p => 1, | ||||||||||
| 28 | paste => $args{text}, | ||||||||||
| 29 | }, | ||||||||||
| 30 | 0 | ); | |||||||||
| 31 | |||||||||||
| 32 | } | ||||||||||
| 33 | |||||||||||
| 34 | 0 | ▶ | sub return { | ||||||||
|
Subroutine
return: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 35 | 0 | my $self = shift; | |||||||||
| 36 | 0 | my $mech = shift; | |||||||||
| 37 | |||||||||||
| 38 | 0 | my $link = $mech->uri(); | |||||||||
| 39 | |||||||||||
| 40 | 0 | return (1, $link); | |||||||||
| 41 | } | ||||||||||
| 42 | |||||||||||
| 43 | |||||||||||
| 44 | 2 | 1; | |||||||||
| 45 | |||||||||||
| 46 | __END__ | ||||||||||