File Coverage

blib/lib/SHARYANTO/Log/Util.pm
Criterion Covered Total %
statement 8 8 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 11 11 100.0


line stmt bran cond sub pod time code
1             package SHARYANTO::Log::Util;
2              
3 1     1   23646 use 5.010;
  1         4  
4 1     1   5 use strict;
  1         2  
  1         19  
5 1     1   5 use warnings;
  1         1  
  1         131  
6              
7             require Exporter;
8             our @ISA = qw(Exporter);
9             our @EXPORT_OK = qw(@log_levels $log_levels_re);
10              
11             our $VERSION = '0.77'; # VERSION
12              
13             our @log_levels = (qw/trace debug info warn error fatal/);
14             our $log_levels_re = join("|", @log_levels);
15             $log_levels_re = qr/\A(?:$log_levels_re)\z/;
16              
17             1;
18             # ABSTRACT: Log-related utilities
19              
20             __END__
21              
22             =pod
23              
24             =encoding UTF-8
25              
26             =head1 NAME
27              
28             SHARYANTO::Log::Util - Log-related utilities
29              
30             =head1 VERSION
31              
32             This document describes version 0.77 of SHARYANTO::Log::Util (from Perl distribution SHARYANTO-Utils), released on 2015-09-04.
33              
34             =head1 SYNOPSIS
35              
36             use SHARYANTO::Log::Util qw(@log_levels $log_levels_re);
37              
38             =head1 DESCRIPTION
39              
40             =head1 VARIABLES
41              
42             None are exported by default, but they are exportable.
43              
44             =head2 @log_levels
45              
46             Contains log levels, from lowest to highest. Currently these are:
47              
48             (qw/trace debug info warn error fatal/)
49              
50             They can be used as method names to L<Log::Any> ($log->debug, $log->warn, etc).
51              
52             =head2 $log_levels_re
53              
54             Contains regular expression to check valid log levels.
55              
56             =head1 SEE ALSO
57              
58             L<SHARYANTO>
59              
60             L<Log::Any>
61              
62             =head1 HOMEPAGE
63              
64             Please visit the project's homepage at L<https://metacpan.org/release/SHARYANTO-Utils>.
65              
66             =head1 SOURCE
67              
68             Source repository is at L<https://github.com/perlancar/perl-SHARYANTO-Utils>.
69              
70             =head1 BUGS
71              
72             Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=SHARYANTO-Utils>
73              
74             When submitting a bug or request, please include a test-file or a
75             patch to an existing test-file that illustrates the bug or desired
76             feature.
77              
78             =head1 AUTHOR
79              
80             perlancar <perlancar@cpan.org>
81              
82             =head1 COPYRIGHT AND LICENSE
83              
84             This software is copyright (c) 2015 by perlancar@cpan.org.
85              
86             This is free software; you can redistribute it and/or modify it under
87             the same terms as the Perl 5 programming language system itself.
88              
89             =cut