line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package NewRelic::Agent; |
2
|
1
|
|
|
1
|
|
14522
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
28
|
|
3
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
167
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.0532'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
require XSLoader; |
8
|
|
|
|
|
|
|
XSLoader::load(__PACKAGE__, $VERSION); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub new { |
11
|
1
|
|
|
1
|
|
11
|
my ($self, %args) = @_; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
my $license_key = delete $args{license_key} |
14
|
|
|
|
|
|
|
|| $ENV{NEWRELIC_LICENSE_KEY} |
15
|
1
|
|
50
|
|
|
11
|
|| ''; |
16
|
|
|
|
|
|
|
my $app_name = delete $args{app_name} |
17
|
|
|
|
|
|
|
|| $ENV{NEWRELIC_APP_NAME} |
18
|
1
|
|
50
|
|
|
10
|
|| 'AppName'; |
19
|
|
|
|
|
|
|
my $app_language = delete $args{app_language} |
20
|
|
|
|
|
|
|
|| $ENV{NEWRELIC_APP_LANGUAGE} |
21
|
1
|
|
50
|
|
|
13
|
|| 'perl'; |
22
|
|
|
|
|
|
|
my $app_language_version = delete $args{app_language_version} |
23
|
|
|
|
|
|
|
|| $ENV{NEWRELIC_APP_LANGUAGE_VERSION} |
24
|
1
|
|
33
|
|
|
7
|
|| $]; |
25
|
|
|
|
|
|
|
|
26
|
1
|
50
|
|
|
|
4
|
if (%args) { |
27
|
0
|
|
|
|
|
0
|
require Carp; |
28
|
0
|
|
|
|
|
0
|
Carp::croak("Invalid arguments: @{[ keys %args ]}"); |
|
0
|
|
|
|
|
0
|
|
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
1
|
|
|
|
|
182
|
return $self->_new($license_key, $app_name, $app_language, $app_language_version); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
# ABSTRACT: Perl Agent for NewRelic APM |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
__END__ |