V3/Server/Version.pm untested

filter: Statementstmt 0.0% 0 / 22 Branchbran n/a Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 31 CC 1 SCAR 6.9
CC
1
Cov
0%
_fetch
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Bb::Collaborate::V3::Server::Version;
2 use warnings; use strict;
3  
4 use Mouse;
5  
6 extends 'Elive::DAO::Singleton','Bb::Collaborate::V3';
7  
8 use Scalar::Util;
9  
10 =head1 NAME
11  
12 Bb::Collaborate::V3::Server::Version - Server Version entity class
13  
14 =cut
15  
16 =head1 DESCRIPTION
17  
18 This class provides Collaborate server version information
19  
20 =cut
21  
22 __PACKAGE__->entity_name('ServerVersion');
23  
24 =head1 PROPERTIES
25  
26 =head2 versionId (Int)
27  
28 The version number as a 4 digit integer, e.g. C<1002>.
29  
30 =cut
31  
32 has 'versionId' => (is => 'rw', isa => 'Int');
33  
34 =head2 versionName (Str)
35  
36 The version in XX.X.X format, e.g. C<10.0.2>.
37  
38 =cut
39  
40 has 'versionName' => (is => 'rw', isa => 'Str');
41  
42 =head2 versionMaxTalkersLimit (Int)
43  
44 The maximum number of talkers that the version can support.
45  
46 =cut
47  
48 has 'versionMaxTalkersLimit' => (is => 'rw', isa => 'Int');
49  
50 =head2 versionMaxFilmersLimit (Int)
51  
52 The maximum number of cameras that the version can support.
53  
54 =cut
55  
56 has 'versionMaxFilmersLimit' => (is => 'rw', isa => 'Int');
57  
58 =head1 METHODS
59  
60 =cut
61  
62 =head2 get
63  
64 my $server_version = Bb::Collaborate::V3::Server::Version->get;
65 print "Collaborate version is: ".$server_version->versionName."\n";
66  
67 Returns the server version information for the current connection.
68  
69 =cut
70  
71 =head2 list
72  
73 my @server_versions = Bb::Collaborate::V3::Server::Version->list;
74  
75 The C<list> method can be used for sites with multiple session servers.
76  
77 =cut
78  
79 sub _fetch {
80 my ($class, $key, %opt) = @_;
81  
82 #
83 # Let the connection resolve which command to use
84 #
85  
86 $opt{command} ||=
87 ['GetServerVersions', 'ListServerVersions'];
88  
89 return $class->SUPER::_fetch($key, %opt);
90 }
91  
92 1;