OO/Client.pm

filter: Statementstmt 42.1% 8 / 19 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 40.0% 2 / 5 Podpod 0.0% 0 / 3 totaltotal 29.4% 10 / 34 CC 3 SCAR 17.9
CC
3
Cov
33%
getOpenedFiles
12.0
SPECOBJ_TYPE
2.0
getChanges
2.0
CRAP 6.0
« OO.pm ↑ Summary OO/_Set.pm »
1 ######################################################################
2 # Copyright (c)2010-2011, David L. Armstrong.
3 #
4 # P4::OO::Client.pm
5 #
6 # See COPYRIGHT AND LICENSE section in pod text below for usage
7 # and distribution rights.
8 #
9 ######################################################################
10  
11 =head1 NAME
12  
13 =head1 SYNOPSIS
14  
15 =head1 DESCRIPTION
16  
17 =cut
18  
19  
20 ######################################################################
21 # Package Initialization
22 #
23 package P4::OO::Client;
24 2 our $VERSION = '0.00_02';
25 2 ▶ use base 'P4::OO::_SpecObj';
Subroutine BEGIN: called CC=1 SCAR=0.0
26 2 ▶ use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
27  
28  
29 ######################################################################
30 # Globals
31 #
32 # Subclasses must define SPECOBJ_TYPE
33 0 ▶ sub SPECOBJ_TYPE { return( 'client' ); }
Subroutine SPECOBJ_TYPE: not called CC=1 SCAR=6.9
Pod undocumented
34  
35  
36 ######################################################################
37 # Methods
38 #
39  
40 sub getChanges
41 0 ▶{
Subroutine getChanges: not called CC=1 SCAR=6.9
Pod undocumented
42 0 my $self = shift();
43  
44 # Asking a Client for its changes is implemented as querying Changes filtered by Client
45 0 my $p4Conn = $self->_getP4Connection();
46 0 my $p4ChangeSet = $p4Conn->query( 'change', { 'client' => $self->_getSpecID() } );
47  
48 0 return( $p4ChangeSet );
49 }
50  
51  
52 sub getOpenedFiles
53 0 ▶{
Subroutine getOpenedFiles: not called CC=3 SCAR=24.8
Pod undocumented
54 0 my $self = shift();
55  
56 0 my $hashArgs = $self->_argsToHash( "getOpenedFiles", @_ );
57  
58 0 ▶ if( ! exists( $hashArgs->{'client'} )
Branch: 1 branch
BranchTrueFalseTotal
unless (exists $hashArgs->{"client"} or exists $hashArgs->{"allClients"}) 0 0 0
Condition0%0/3
exists $hashArgs->{"client"} or exists $hashArgs->{"allClients"}
l!l&&r!l&&!r
000
MC/DC0%0/2
exists $hashArgs->{"client"} or exists $hashArgs->{"allClients"}
exists $hashArgs->{"client"} exists $hashArgs->{"allClients"}
Truth table0%0/3
A or B
A= exists $hashArgs->{"client"}B= exists $hashArgs->{"allClients"}
ABresult
1X1
011
000
59 && ! exists( $hashArgs->{'allClients'} ) )
60 {
61 0 $hashArgs->{'client'} = $self;
62 }
63  
64 0 my $p4Conn = $self->_getP4Connection();
65 0 return( $p4Conn->runCommand( 'opened', $hashArgs ) );
66 }
67  
68 ######################################################################
69 # Standard authorship and copyright for documentation
70 #
71  
72 =head1 AUTHOR
73  
74 David L. Armstrong <armstd@cpan.org>
75  
76 =head1 COPYRIGHT AND LICENSE
77  
78 P4::OO::Client is Copyright (c)2010-2011, David L. Armstrong.
79  
80 This module is free software; you can redistribute it and/or
81 modify it under the same terms as Perl itself, either Perl
82 version 5.8.8 or, at your option, any later version of Perl 5
83 you may have available.
84  
85 =head1 SUPPORT AND WARRANTY
86  
87 This program is distributed in the hope that it will be
88 useful, but it is provided "as is" and without any expressed
89 or implied warranties.
90  
91 =cut
92  
93 2 1;
« OO.pm ↑ Summary OO/_Set.pm »