lib/App/Greple/Common.pm

filter: Statementstmt 100% 26 / 26 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 100% 30 / 30 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« lib/App/Greple.pm ↑ Summary lib/App/Greple/colors.pm »
1 package App::Greple::Common;
2  
3 172 ▶use v5.24;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 172 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 =encoding utf-8
7  
8 =head1 NAME
9  
10 App::Greple::Common - interface for common resources
11  
12 =head1 SYNOPSIS
13  
14 use App::Greple::Common qw(@color_list)
15  
16 =head1 DESCRIPTION
17  
18 This module provides interface to access L<App::Greple> common
19 resources which can be accessed from the external modules.
20  
21 Historically, only C<&FILELABEL> is exported when used without
22 arguments. Note that when used with arguments, only the specified
23 elements are exported.
24  
25 =head1 EXPORTED VARIABLES
26  
27 =head2 CONSTANTS
28  
29 =over 7
30  
31 =item C<&FILELABEL>
32  
33 A label corresponding to the filename passed in the
34 L<App::Greple::Func> interface.
35  
36 =back
37  
38 =head2 VARIABLES
39  
40 =over 7
41  
42 =item C<%color_list>
43  
44 Indexed color pallet.
45  
46 =item C<%color_hash>
47  
48 Labeled color table.
49  
50 =item C<%debug>
51  
52 Debug flag.
53  
54 =back
55  
56 =head1 AUTHOR
57  
58 Kazumasa Utashiro
59  
60 =head1 LICENSE
61  
62 Copyright ©︎ 1991-2026 Kazumasa Utashiro.
63  
64 This library is free software; you can redistribute it and/or modify
65 it under the same terms as Perl itself.
66  
67 =cut
68  
69 172 ▶use Exporter 'import';
Subroutine BEGIN: called CC=1 SCAR=0.0
70 172 our @EXPORT = ();
71 172 our %EXPORT_TAGS = ();
72 172 our @EXPORT_OK = qw();
73  
74 172 ▶use constant FILELABEL => '__file__';
Subroutine BEGIN: called CC=1 SCAR=0.0
75 172 push @EXPORT, qw(FILELABEL);
76  
77 172 *debug = \%::opt_d; push @EXPORT_OK, qw(%debug);
78 172 *color_list = \@::colors; push @EXPORT_OK, qw(@color_list);
79 172 *color_hash = \%::colormap; push @EXPORT_OK, qw(%color_hash);
80  
81 172 *setopt = \&::setopt; push @EXPORT_OK, qw(setopt);
82 172 *newopt = \&::newopt; push @EXPORT_OK, qw(newopt);
83  
84 172 1;
« lib/App/Greple.pm ↑ Summary lib/App/Greple/colors.pm »