One Hat Cyber Team
Your IP :
162.159.115.33
Server IP :
188.114.96.4
Server :
Linux thuru 6.5.11-4-pve #1 SMP PREEMPT_DYNAMIC PMX 6.5.11-4 (2023-11-20T10:19Z) x86_64
Server Software :
Apache/2.4.51 (Unix) OpenSSL/1.0.2k-fips
PHP Version :
7.3.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
perl5
/
vendor_perl
/
Log
/
Dispatch
/
View File Name :
Base.pm
package Log::Dispatch::Base; { $Log::Dispatch::Base::VERSION = '2.41'; } use strict; use warnings; sub _get_callbacks { shift; my %p = @_; return unless exists $p{callbacks}; return @{ $p{callbacks} } if ref $p{callbacks} eq 'ARRAY'; return $p{callbacks} if ref $p{callbacks} eq 'CODE'; return; } sub _apply_callbacks { my $self = shift; my %p = @_; my $msg = delete $p{message}; foreach my $cb ( @{ $self->{callbacks} } ) { $msg = $cb->( message => $msg, %p ); } return $msg; } sub add_callback { my $self = shift; my $value = shift; Carp::carp("given value $value is not a valid callback") unless ref $value eq 'CODE'; $self->{callbacks} ||= []; push @{ $self->{callbacks} }, $value; return; } 1; # ABSTRACT: Code shared by dispatch and output objects. __END__ =pod =head1 NAME Log::Dispatch::Base - Code shared by dispatch and output objects. =head1 VERSION version 2.41 =head1 SYNOPSIS use Log::Dispatch::Base; ... @ISA = qw(Log::Dispatch::Base); =head1 DESCRIPTION Unless you are me, you probably don't need to know what this class does. =head1 AUTHOR Dave Rolsky <autarch@urth.org> =head1 COPYRIGHT AND LICENSE This software is Copyright (c) 2013 by Dave Rolsky. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) =cut