| 1 | package Log::Log4perl::Appender::Lim::CLI; | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | 1 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 1 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | |||||||||||||||||||||
| 6 | 1 | ▶ | use base qw(Log::Log4perl::Appender); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | =encoding utf8 | ||||||||||||||||||||
| 9 | |||||||||||||||||||||
| 10 | =head1 NAME | ||||||||||||||||||||
| 11 | |||||||||||||||||||||
| 12 | Log::Log4perl::Appender::Lim::CLI - A Log4perl appender for Lim CLI | ||||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | =head1 VERSION | ||||||||||||||||||||
| 15 | |||||||||||||||||||||
| 16 | Version 0.15 | ||||||||||||||||||||
| 17 | |||||||||||||||||||||
| 18 | =cut | ||||||||||||||||||||
| 19 | |||||||||||||||||||||
| 20 | 1 | our $VERSION = '0.15'; | |||||||||||||||||||
| 21 | |||||||||||||||||||||
| 22 | =head1 DESCRIPTION | ||||||||||||||||||||
| 23 | |||||||||||||||||||||
| 24 | This module is used for getting L<Log::Log4perl> output to the L<Lim::CLI> | ||||||||||||||||||||
| 25 | module. | ||||||||||||||||||||
| 26 | |||||||||||||||||||||
| 27 | =cut | ||||||||||||||||||||
| 28 | |||||||||||||||||||||
| 29 | 0 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 30 | 0 | my $this = shift; | |||||||||||||||||||
| 31 | 0 | ▶ | my $class = ref($this) || $this; | ||||||||||||||||||
|
Condition0%0/3
ref $this || $this
MC/DC0%0/2
ref $this || $this
ref $this
$this
Truth table0%0/3
A || B
A= ref $thisB= $this
| |||||||||||||||||||||
| 32 | 0 | my %args = ( @_ ); | |||||||||||||||||||
| 33 | 0 | my $self = { | |||||||||||||||||||
| 34 | name => 'unknown name', | ||||||||||||||||||||
| 35 | %args | ||||||||||||||||||||
| 36 | }; | ||||||||||||||||||||
| 37 | |||||||||||||||||||||
| 38 | 0 | bless $self, $class; | |||||||||||||||||||
| 39 | } | ||||||||||||||||||||
| 40 | |||||||||||||||||||||
| 41 | 0 | ▶ | sub log { | ||||||||||||||||||
|
Subroutine
log: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 42 | 0 | my($self, %params) = @_; | |||||||||||||||||||
| 43 | |||||||||||||||||||||
| 44 | 0 | ▶ | if (defined $self->{cli}) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 45 | 0 | $params{message} =~ s/[\r\n]+$//o; | |||||||||||||||||||
| 46 | 0 | $self->{cli}->println($params{message}); | |||||||||||||||||||
| 47 | } | ||||||||||||||||||||
| 48 | } | ||||||||||||||||||||
| 49 | |||||||||||||||||||||
| 50 | =head1 AUTHOR | ||||||||||||||||||||
| 51 | |||||||||||||||||||||
| 52 | Jerry Lundström, C<< <lundstrom.jerry at gmail.com> >> | ||||||||||||||||||||
| 53 | |||||||||||||||||||||
| 54 | =head1 BUGS | ||||||||||||||||||||
| 55 | |||||||||||||||||||||
| 56 | Please report any bugs or feature requests to L<https://github.com/jelu/log-log4perl-appender-lim-cli/issues>. | ||||||||||||||||||||
| 57 | |||||||||||||||||||||
| 58 | =head1 SUPPORT | ||||||||||||||||||||
| 59 | |||||||||||||||||||||
| 60 | You can find documentation for this module with the perldoc command. | ||||||||||||||||||||
| 61 | |||||||||||||||||||||
| 62 | perldoc Log::Log4perl::Appender::Lim::CLI | ||||||||||||||||||||
| 63 | |||||||||||||||||||||
| 64 | You can also look for information at: | ||||||||||||||||||||
| 65 | |||||||||||||||||||||
| 66 | =over 4 | ||||||||||||||||||||
| 67 | |||||||||||||||||||||
| 68 | =item * Lim issue tracker (report bugs here) | ||||||||||||||||||||
| 69 | |||||||||||||||||||||
| 70 | L<https://github.com/jelu/log-log4perl-appender-lim-cli/issues> | ||||||||||||||||||||
| 71 | |||||||||||||||||||||
| 72 | =back | ||||||||||||||||||||
| 73 | |||||||||||||||||||||
| 74 | =head1 ACKNOWLEDGEMENTS | ||||||||||||||||||||
| 75 | |||||||||||||||||||||
| 76 | =head1 LICENSE AND COPYRIGHT | ||||||||||||||||||||
| 77 | |||||||||||||||||||||
| 78 | Copyright 2012 Jerry Lundström. | ||||||||||||||||||||
| 79 | |||||||||||||||||||||
| 80 | This program is free software; you can redistribute it and/or modify it | ||||||||||||||||||||
| 81 | under the terms of either: the GNU General Public License as published | ||||||||||||||||||||
| 82 | by the Free Software Foundation; or the Artistic License. | ||||||||||||||||||||
| 83 | |||||||||||||||||||||
| 84 | See http://dev.perl.org/licenses/ for more information. | ||||||||||||||||||||
| 85 | |||||||||||||||||||||
| 86 | |||||||||||||||||||||
| 87 | =cut | ||||||||||||||||||||
| 88 | |||||||||||||||||||||
| 89 | 1 | 1; # End of Log::Log4perl::Appender::Lim::CLI | |||||||||||||||||||