| 1 | 6 | ▶ | use Object::Pad ':experimental(init_expr)'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | |||
| 3 | package OpenTelemetry::SDK::InstrumentationScope; | ||
| 4 | |||
| 5 | 6 | our $VERSION = '0.101'; | |
| 6 | |||
| 7 | 5 | ▶ | class OpenTelemetry::SDK::InstrumentationScope :does(OpenTelemetry::Attributes) { |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 6 | ▶ | use OpenTelemetry::Common (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 6 | ▶ | field $name :param :reader; |
|
Subroutine
name: called CC=1 SCAR=0.0
Pod
documented
| |||
| 11 | 5 | field $version :param :reader //= ''; | |
| 12 | |||
| 13 | 5 | ▶ | my $logger = OpenTelemetry::Common::internal_logger; |
|
Subroutine
version: called CC=1 SCAR=0.0
Pod
documented
| |||
| 14 | |||
| 15 | ADJUST { | ||
| 16 | $name ||= do { | ||
| 17 | $logger->warn('Created an instrumentation scope with an undefined or empty name'); | ||
| 18 | |||
| 19 | # If the name is not valid, we clear the version, | ||
| 20 | # since it only really makes sense for the name | ||
| 21 | $version = ''; | ||
| 22 | |||
| 23 | ''; | ||
| 24 | }; | ||
| 25 | } | ||
| 26 | |||
| 27 | 13 | ▶ | method to_string () { '[' . $name . ':' . $version . ']' } |
|
Subroutine
to_string: called CC=1 SCAR=0.0
Pod
documented
| |||
| 28 | 6 | } | |