line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
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
|
|
|
|
|
|
|
our $VERSION = '0.00_02'; |
25
|
2
|
|
|
2
|
|
38734
|
use base 'P4::OO::_SpecObj'; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
1389
|
|
26
|
2
|
|
|
2
|
|
12
|
use strict; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
383
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
###################################################################### |
30
|
|
|
|
|
|
|
# Globals |
31
|
|
|
|
|
|
|
# |
32
|
|
|
|
|
|
|
# Subclasses must define SPECOBJ_TYPE |
33
|
0
|
|
|
0
|
0
|
|
sub SPECOBJ_TYPE { return( 'client' ); } |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
###################################################################### |
37
|
|
|
|
|
|
|
# Methods |
38
|
|
|
|
|
|
|
# |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub getChanges |
41
|
|
|
|
|
|
|
{ |
42
|
0
|
|
|
0
|
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
|
|
|
|
|
|
|
{ |
54
|
0
|
|
|
0
|
0
|
|
my $self = shift(); |
55
|
|
|
|
|
|
|
|
56
|
0
|
|
|
|
|
|
my $hashArgs = $self->_argsToHash( "getOpenedFiles", @_ ); |
57
|
|
|
|
|
|
|
|
58
|
0
|
0
|
0
|
|
|
|
if( ! exists( $hashArgs->{'client'} ) |
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 |
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
|
|
|
|
|
|
|
1; |