blib/lib/JMX/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 SCAR 8.3
CC
2
Cov
58%
__ANON__
6.0
name
2.0
vendor
2.0
CRAP 2.3
« blib/lib/JMX/Jmx4Perl/Product/Resin.pm ↑ Summary blib/lib/JMX/Jmx4Perl/Agent/Jolokia/Verifier/MD5Verifier.pm »
1 #!/usr/bin/perl
2 package JMX::Jmx4Perl::Product::Terracotta;
3  
4 2 ▶use JMX::Jmx4Perl::Product::BaseHandler;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use base "JMX::Jmx4Perl::Product::BaseHandler";
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 ▶use Data::Dumper;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 2 ▶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 sub id {
23 2 ▶ return "terracotta";
Subroutine id: called CC=1 SCAR=0.0
Pod documented
24 }
25  
26 sub name {
27 0 ▶ return "Terracotta";
Subroutine name: not called CC=1 SCAR=6.9
Pod documented
28 }
29  
30  
31 sub order {
32 2 ▶ return 210;
Subroutine order: called CC=1 SCAR=0.0
Pod documented
33 }
34  
35 sub vendor {
36 0 ▶ return "Terracotta";
Subroutine vendor: not called CC=1 SCAR=6.9
Pod documented
37 }
38  
39 sub version {
40 0 ▶ return shift->{version};
Subroutine version: not called CC=1 SCAR=6.9
Pod documented
41 }
42  
43 sub autodetect_pattern {
44 return sub {
45 0 ▶ my $self = shift;
Subroutine __ANON__: not called CC=2 SCAR=17.9
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 ▶ };
Subroutine autodetect_pattern: not called CC=1 SCAR=6.9
Pod documented
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 2 1;
« blib/lib/JMX/Jmx4Perl/Product/Resin.pm ↑ Summary blib/lib/JMX/Jmx4Perl/Agent/Jolokia/Verifier/MD5Verifier.pm »