CSAF/Util/App.pm untested

filter: Statementstmt 0.0% 0 / 27 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 8 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 37 CC 1 SCAR 6.9
CC
1
Cov
0%
cli_error
2.0
cli_version
2.0
BEGIN
2.0
CRAP 2.0
1 package CSAF::Util::App;
2  
3 use 5.010001;
4 use strict;
5 use warnings;
6 use utf8;
7  
8 use Exporter 'import';
9 our @EXPORT_OK = (qw[cli_error cli_version]);
10  
11 sub cli_error {
12 my ($error) = @_;
13 $error =~ s/ at .* line \d+.*//;
14 print STDERR "ERROR: $error\n";
15 }
16  
17 sub cli_version {
18  
19 (my $progname = $0) =~ s/.*\///;
20  
21 require CSAF;
22  
23 say <<"VERSION";
24 $progname version $CSAF::VERSION
25  
26 Copyright 2023-2025, Giuseppe Di Terlizzi <gdt\@cpan.org>
27  
28 This program is part of the CSAF distribution and is free software;
29 you can redistribute it and/or modify it under the same terms as Perl itself.
30  
31 Complete documentation for $progname can be found using 'man $progname'
32 or on the internet at <https://metacpan.org/dist/CSAF>.
33 VERSION
34  
35 return 0;
36  
37 }
38  
39 1;
40  
41 __END__