⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.23
Server IP:
178.33.27.10
Server:
Linux cpanel.dev-unit.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
Server Software:
Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips
PHP Version:
8.2.11
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