From aba10634e7bb6b471958b0a36701cd3f1c4899a3 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Wed, 28 Aug 2013 15:37:07 +1200 Subject: [PATCH 1/1] Adding POD and copyright headers Signed-off-by: Jason Stephenson --- lib/NCIP/Configuration.pm | 38 +++++++++++++++++++++++++------------- lib/NCIPServer.pm | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 13 deletions(-) diff --git a/lib/NCIP/Configuration.pm b/lib/NCIP/Configuration.pm index 4db0e5f..1add3e3 100644 --- a/lib/NCIP/Configuration.pm +++ b/lib/NCIP/Configuration.pm @@ -1,20 +1,22 @@ package NCIP::Configuration; + +# Copyright 2013 Catalyst IT + +# This file is part of NCIPServer # -#=============================================================================== -# -# FILE: Configuration.pm +# NCIPServer is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. # -# DESCRIPTION: +# NCIPServer is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. # -# FILES: --- -# BUGS: --- -# NOTES: --- -# AUTHOR: Chris Cormack (rangi), chrisc@catalyst.net.nz -# ORGANIZATION: Koha Development Team -# VERSION: 1.0 -# CREATED: 28/08/13 10:16:55 -# REVISION: --- -#=============================================================================== +# You should have received a copy of the GNU General Public License along +# with NCIPServer; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + =head1 NAME @@ -53,6 +55,16 @@ sub new { return $self; } +=head1 FUNCTIONS + +=head2 find_service + + my $service = $config->($sockaddr, $port, $proto); + + Used to find which service you should be using to answer an incoming request + +=cut + sub find_service { my ( $self, $sockaddr, $port, $proto ) = @_; my $portstr; diff --git a/lib/NCIPServer.pm b/lib/NCIPServer.pm index de274f4..52e14bd 100644 --- a/lib/NCIPServer.pm +++ b/lib/NCIPServer.pm @@ -1,5 +1,22 @@ package NCIPServer; +# Copyright 2013 Catalyst IT + +# This file is part of NCIPServer +# +# NCIPServer is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# NCIPServer is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with NCIPServer; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + use Sys::Syslog qw(syslog); use Modern::Perl; use NCIP::Configuration; @@ -7,6 +24,22 @@ use IO::Socket::INET; use Socket qw(:DEFAULT :crlf); use base qw(Net::Server::PreFork); +=head1 NAME + + NCIP::Configuration + +=head1 SYNOPSIS + + use NCIPServer; + my $server = NCIPServer->new({config_dir => $config_dir}); + +=head1 FUNCTIONS + +=head2 run() + + Apart from new, this is the only method you should ever call from outside this module +=cut + our $VERSION = '0.01'; # This sets up the configuration -- 2.43.2