blib/lib/Net/UPnP/AV/Item.pm

filter: Statementstmt 100% 31 / 31 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 9 / 9 Podpod 40.0% 2 / 5 totaltotal 89.8% 44 / 49 CC 3 SCAR 3.2
CC
3
Cov
94%
seturl
2.0
setcontenttype
2.0
BEGIN
1.0
CRAP 1.4
« blib/lib/Net/UPnP/QueryResponse.pm ↑ Summary blib/lib/Net/UPnP.pm »
1 package Net::UPnP::AV::Item;
2  
3 #-----------------------------------------------------------------
4 # Net::UPnP::AV::Item
5 #-----------------------------------------------------------------
6  
7 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 3 ▶use Net::UPnP::AV::Content;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 3 ▶use vars qw(@ISA $_URL $_CONTENTTYPE);
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 3 @ISA = qw(Net::UPnP::AV::Content);
15  
16 3 $_URL = '_url';
17 3 $_CONTENTTYPE = '_contenttype';
18  
19 #------------------------------
20 # new
21 #------------------------------
22  
23 27 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
24 27 my($class) = shift;
25 27 my($this) = $class->SUPER::new();
26 27 $this->{$Net::UPnP::AV::Item::_URL} = '';
27 27 $this->{$Net::UPnP::AV::Item::_CONTENTTYPE} = '';
28 27 bless $this, $class;
29 }
30  
31 #------------------------------
32 # url
33 #------------------------------
34  
35 1 ▶sub seturl() {
Subroutine seturl: called CC=2 SCAR=7.1
Pod undocumented
36 1 my($this) = shift;
37 1 ▶ if (@_) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_) 1 0 1
38 1 $this->{$Net::UPnP::AV::Item::_URL} = $_[0];
39 }
40 }
41  
42 1 ▶sub geturl() {
Subroutine geturl: called CC=1 SCAR=0.0
Pod documented
43 1 my($this) = shift;
44 1 $this->{$Net::UPnP::AV::Item::_URL};
45 }
46  
47 #------------------------------
48 # contenttype
49 #------------------------------
50  
51 1 ▶sub setcontenttype() {
Subroutine setcontenttype: called CC=2 SCAR=7.1
Pod undocumented
52 1 my($this) = shift;
53 1 ▶ if (@_) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_) 1 0 1
54 1 $this->{$Net::UPnP::AV::Item::_CONTENTTYPE} = $_[0];
55 }
56 }
57  
58 1 ▶sub getcontenttype() {
Subroutine getcontenttype: called CC=1 SCAR=0.0
Pod documented
59 1 my($this) = shift;
60 1 $this->{$Net::UPnP::AV::Item::_CONTENTTYPE};
61 }
62  
63 #------------------------------
64 # is*
65 #------------------------------
66  
67 sub isitem() {
68 1;
69 }
70  
71 3 1;
72  
73 __END__
« blib/lib/Net/UPnP/QueryResponse.pm ↑ Summary blib/lib/Net/UPnP.pm »