Nopaste/Service/PastebinCom.pm

filter: Statementstmt 58.6% 17 / 29 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 71.4% 5 / 7 Podpod 50.0% 1 / 2 totaltotal 52.2% 23 / 44 CC 4 SCAR 21.6
CC
4
Cov
49%
run
20.0
available
2.0
BEGIN
1.0
CRAP 8.7
« Nopaste/Service/Ubuntu.pm ↑ Summary Nopaste/Service/Pastie.pm »
1 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 package App::Nopaste::Service::PastebinCom;
4 # ABSTRACT: Service provider for Pastebin - http://pastebin.com/
5  
6 1 our $VERSION = '1.013';
7  
8 1 ▶use parent 'App::Nopaste::Service';
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use Module::Runtime 'use_module';
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use namespace::clean 0.19;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 0 ▶sub available {
Subroutine available: not called CC=1 SCAR=6.9
Pod undocumented
13 0 eval { use_module('WWW::Pastebin::PastebinCom::Create'); 1 }
14 }
15  
16 0 ▶sub run {
Subroutine run: not called CC=4 SCAR=30.0
Pod documented
17 0 my $self = shift;
18 0 my %args = @_;
19  
20 0 use_module('WWW::Pastebin::PastebinCom::Create');
21  
22 0 ▶ $args{poster} = delete $args{nick} if defined $args{nick};
Branch: 1 branch
BranchTrueFalseTotal
if defined $args{"nick"} 0 0 0
23 0 ▶ $args{format} = delete $args{lang} if defined $args{lang};
Branch: 1 branch
BranchTrueFalseTotal
if defined $args{"lang"} 0 0 0
24  
25 0 my $paster = WWW::Pastebin::PastebinCom::Create->new;
26 0 my $ok = $paster->paste(
27 expiry => 'm',
28 %args,
29 );
30  
31 0 ▶ return (0, $paster->error) unless $ok;
Branch: 1 branch
BranchTrueFalseTotal
unless $ok 0 0 0
32 0 return (1, $paster->paste_uri);
33 }
34  
35 1 1;
36  
37 __END__
« Nopaste/Service/Ubuntu.pm ↑ Summary Nopaste/Service/Pastie.pm »