| 1 | # This code is part of Perl distribution Log-Report-Optional version 1.08. | ||||||||||||||||||||||||||||
| 2 | # The POD got stripped from this file by OODoc version 3.04. | ||||||||||||||||||||||||||||
| 3 | # For contributors see file ChangeLog. | ||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||
| 5 | # This software is copyright (c) 2013-2025 by Mark Overmeer. | ||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | # This is free software; you can redistribute it and/or modify it under | ||||||||||||||||||||||||||||
| 8 | # the same terms as the Perl 5 programming language system itself. | ||||||||||||||||||||||||||||
| 9 | # SPDX-License-Identifier: Artistic-1.0-Perl OR GPL-1.0-or-later | ||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||
| 11 | #oodist: *** DO NOT USE THIS VERSION FOR PRODUCTION *** | ||||||||||||||||||||||||||||
| 12 | #oodist: This file contains OODoc-style documentation which will get stripped | ||||||||||||||||||||||||||||
| 13 | #oodist: during its release in the distribution. You can use this file for | ||||||||||||||||||||||||||||
| 14 | #oodist: testing, however the code of this development version may be broken! | ||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | package Log::Report::Optional;{ | ||||||||||||||||||||||||||||
| 17 | 2 | our $VERSION = '1.08'; | |||||||||||||||||||||||||||
| 18 | } | ||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | 2 | ▶ | use base 'Exporter'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | 2 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 23 | 2 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||
| 25 | #-------------------- | ||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||
| 27 | 2 | my ($supported, @used_by); | |||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||
| 29 | 2 | ▶ | BEGIN { | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=4 SCAR=22.3
| |||||||||||||||||||||||||||||
| 30 | 2 | ▶ | if($INC{'Log/Report.pm'}) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 31 | 0 | { $supported = 'Log::Report'; | |||||||||||||||||||||||||||
| 32 | 0 | my $version = $Log::Report::VERSION; | |||||||||||||||||||||||||||
| 33 | 0 | ▶ | die "Log::Report too old for ::Optional, need at least 1.00" | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$version and $version le "1.00"
MC/DC0%0/2
$version and $version le "1.00"
$version
$version le "1.00"
Truth table0%0/3
A and B
A= $versionB= $version le "1.00"
| |||||||||||||||||||||||||||||
| 34 | if $version && $version le '1.00'; | ||||||||||||||||||||||||||||
| 35 | } | ||||||||||||||||||||||||||||
| 36 | else | ||||||||||||||||||||||||||||
| 37 | 2 | { require Log::Report::Minimal; | |||||||||||||||||||||||||||
| 38 | 2 | $supported = 'Log::Report::Minimal'; | |||||||||||||||||||||||||||
| 39 | } | ||||||||||||||||||||||||||||
| 40 | } | ||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||
| 42 | sub import(@) | ||||||||||||||||||||||||||||
| 43 | 2 | ▶ | { my $class = shift; | ||||||||||||||||||||||||||
|
Subroutine
import: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 44 | 2 | push @used_by, (caller)[0]; | |||||||||||||||||||||||||||
| 45 | 2 | $supported->import('+1', @_); | |||||||||||||||||||||||||||
| 46 | } | ||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||
| 48 | #-------------------- | ||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||
| 50 | 1 | ▶ | sub usedBy() { @used_by } | ||||||||||||||||||||||||||
|
Subroutine
usedBy: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||
| 52 | 2 | 1; | |||||||||||||||||||||||||||