blib/lib/App/Nopaste/Service/Linode.pm

filter: Statementstmt 50.0% 11 / 22 Branchbran n/a Conditioncond 0.0% 0 / 4 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 50.0% 3 / 6 Podpod 100% 3 / 3 totaltotal 45.9% 17 / 37 CC 3 SCAR 16.8
CC
3
Cov
42%
get
12.0
uri
2.0
post_content
2.0
CRAP 5.4
↑ Summary
1 package App::Nopaste::Service::Linode;
2 1 our $VERSION = '0.06';
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use base 'App::Nopaste::Service::AnyPastebin';
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 0 ▶sub uri { "http://p.linode.com" }
Subroutine uri: not called CC=1 SCAR=6.9
Pod documented
8  
9 0 ▶sub get {
Subroutine get: not called CC=3 SCAR=24.8
Pod documented
10 0 my $self = shift;
11 0 my $mech = shift;
12 0 my %args = @_;
13  
14 0 ▶ $args{username} ||= 'no';
Condition0%0/2
$args{"username"} ||= "no"
l!l
00
MC/DC0%0/1
$args{"username"} ||= "no"
$args{"username"}
Truth table0%0/2
A
A= $args{"username"}
Aresult
11
00
15 0 ▶ $args{password} ||= 'spam';
Condition0%0/2
$args{"password"} ||= "spam"
l!l
00
MC/DC0%0/1
$args{"password"} ||= "spam"
$args{"password"}
Truth table0%0/2
A
A= $args{"password"}
Aresult
11
00
16
17 0 return $self->SUPER::get($mech => %args);
18 }
19  
20 0 ▶sub post_content {
Subroutine post_content: not called CC=1 SCAR=6.9
Pod documented
21 0 my ($self, %args) = @_;
22  
23 0 my $content = $self->SUPER::post_content(%args);
24  
25 # On p.linode.com the code2 parameter is called code2z for some
26 # reason.
27 0 $content->{code2z} = delete $content->{code2};
28  
29 0 return $content;
30 }
31  
32 =head1 NAME
33  
34 App::Nopaste::Service::Linode - L<App::Nopaste> interface to L<http://p.linode.com>
35  
36 =head1 AUTHOR
37  
38 E<AElig>var ArnfjE<ouml>rE<eth> Bjarmason <avar@cpan.org>
39  
40 =head1 LICENSE AND COPYRIGHT
41  
42 Copyright 2010 E<AElig>var ArnfjE<ouml>rE<eth> Bjarmason <avar@cpan.org>
43  
44 =cut
45  
46 1 1;
47  
↑ Summary