Bug 15253: Add POD to C4/SIP/Logger.pm and C4/SIP/Trapper.pm
authorKyle M Hall <kyle@bywatersolutions.com>
Wed, 29 Apr 2020 10:42:29 +0000 (06:42 -0400)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 12 May 2020 10:47:04 +0000 (11:47 +0100)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

C4/SIP/Logger.pm
C4/SIP/Trapper.pm

index 8eff682..4116921 100644 (file)
@@ -6,11 +6,15 @@ use Modern::Perl;
 our $activeSIPServer;
 our $activeLogger;
 
+=head1 NAME
+
+C4::SIP::Logger - Module for handling SIP server logging
+
 =head2 get_SIPServer
 
     my $sipServer = C4::SIP::SIPServer::get_SIPServer()
 
-@RETURNS C4::SIP::SIPServer, the current server's child-process used to handle this SIP-transaction
+    @RETURNS C4::SIP::SIPServer, the current server's child-process used to handle this SIP-transaction
 
 =cut
 
@@ -18,6 +22,16 @@ sub get_SIPServer {
     return $activeSIPServer;
 }
 
+=head2 _set_SIPServer
+
+    my $sipServer = C4::SIP::SIPServer::_set_SIPServer($sipServer)
+
+    Sets the passed in SIP server as the active SIP server and returns it as well
+
+    @RETURNS C4::SIP::SIPServer, the current server's child-process used to handle this SIP-transaction
+
+=cut
+
 sub _set_SIPServer {
     my ($sipServer) = @_;
     $activeSIPServer = $sipServer;
@@ -36,6 +50,12 @@ sub get_logger {
     return $activeLogger;
 }
 
+=head2 set_logger
+
+    my $logger = C4::SIP::SIPServer::set_logger($logger)
+
+=cut
+
 sub set_logger {
     my ($logger) = @_;
     $activeLogger = $logger;
index 8dce10e..8f115b5 100644 (file)
@@ -4,11 +4,27 @@ use Modern::Perl;
 
 use Koha::Logger;
 
+=head1 NAME
+
+C4::SIP::Trapper - Module for capturing warnings for the SIP logger
+
+=head2 TIEHANDLE
+
+    Ties the given class to this module.
+
+=cut
+
 sub TIEHANDLE {
     my $class = shift;
     bless [], $class;
 }
 
+=head2 PRINT
+
+    Captures warnings and directs them to Koha::Logger as well as STDERR
+
+=cut
+
 sub PRINT {
     my $self = shift;
     $Log::Log4perl::caller_depth++;