Jmx4Perl/Product/Terracotta.pm

filter: Statementstmt 62.0% 18 / 29 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 58.3% 7 / 12 Podpod 100% 6 / 6 totaltotal 63.2% 31 / 49 CC 2 SCAR 7.3
CC
2
Cov
58%
__ANON__
6.0
name
2.0
vendor
2.0
CRAP 2.1
« Jmx4Perl/Product/Resin.pm ↑ Summary Jmx4Perl/Agent/Jolokia/Verifier/MD5Verifier.pm »
1 #!/usr/bin/perl
2 package JMX::Jmx4Perl::Product::Terracotta;
3  
4 4 ▶use JMX::Jmx4Perl::Product::BaseHandler;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 4 ▶use base "JMX::Jmx4Perl::Product::BaseHandler";
Subroutine BEGIN: called CC=1 SCAR=0.0
7 4 ▶use Data::Dumper;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 4 ▶use Carp qw(croak);
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 =head1 NAME
12  
13 JMX::Jmx4Perl::Product::Terracotta - Handler for Terracotta server
14  
15 =head1 DESCRIPTION
16  
17 This is the product handler support Terracotta (L<http://www.terracotta.org/>)
18 which works with the JVM Agent provided for Sun JDK 6 based applications.
19  
20 =cut
21  
22 4 ▶sub id {
Subroutine id: called CC=1 SCAR=0.0
Pod documented
23 4 return "terracotta";
24 }
25  
26 0 ▶sub name {
Subroutine name: not called CC=1 SCAR=6.9
Pod documented
27 0 return "Terracotta";
28 }
29  
30  
31 4 ▶sub order {
Subroutine order: called CC=1 SCAR=0.0
Pod documented
32 4 return 210;
33 }
34  
35 0 ▶sub vendor {
Subroutine vendor: not called CC=1 SCAR=6.9
Pod documented
36 0 return "Terracotta";
37 }
38  
39 0 ▶sub version {
Subroutine version: not called CC=1 SCAR=6.9
Pod documented
40 0 return shift->{version};
41 }
42  
43 0 ▶sub autodetect_pattern {
Subroutine autodetect_pattern: not called CC=1 SCAR=6.9
Pod documented
44 0 ▶ return sub {
Subroutine __ANON__: not called CC=2 SCAR=17.9
45 0 my $self = shift;
46 0 my $j4p = $self->{jmx4perl};
47 0 my $found = $self->try_attribute("version","org.terracotta.internal:name=Terracotta Server,type=Terracotta Server","Version");
48 0 ▶ if ($found) {
Branch: 1 branch
BranchTrueFalseTotal
if ($found) { } 0 0 0
49 0 $self->{version} =~ s/.*?([\d\.]+).*/$1/;
50 0 return 1;
51 } else {
52 0 return undef;
53 }
54 0 };
55 }
56  
57 =head1 LICENSE
58  
59 This file is part of jmx4perl.
60  
61 Jmx4perl is free software: you can redistribute it and/or modify
62 it under the terms of the GNU General Public License as published by
63 the Free Software Foundation, either version 2 of the License, or
64 (at your option) any later version.
65  
66 jmx4perl is distributed in the hope that it will be useful,
67 but WITHOUT ANY WARRANTY; without even the implied warranty of
68 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
69 GNU General Public License for more details.
70  
71 You should have received a copy of the GNU General Public License
72 along with jmx4perl. If not, see <http://www.gnu.org/licenses/>.
73  
74 A commercial license is available as well. Please contact roland@cpan.org for
75 further details.
76  
77 =head1 AUTHOR
78  
79 roland@cpan.org
80  
81 =cut
82  
83 4 1;
« Jmx4Perl/Product/Resin.pm ↑ Summary Jmx4Perl/Agent/Jolokia/Verifier/MD5Verifier.pm »