System Preference updates
[koha.git] / C4 / Boolean.pm
index fee3917..d8c14fb 100644 (file)
@@ -1,7 +1,5 @@
 package C4::Boolean;
 
-# $Id$
-
 #package to handle Boolean values in the parameters table
 # Note: This is just a utility module; it should not be instantiated.
 
@@ -19,18 +17,29 @@ package C4::Boolean;
 # 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
-# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
-# Suite 330, Boston, MA  02111-1307 USA
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 use strict;
+use warnings;
+
 use POSIX;
-require Exporter;
 
 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
 
-# set the version for version checking
-$VERSION = 0.01;
+BEGIN {
+       # set the version for version checking
+       $VERSION = 0.02;
+       require Exporter;
+       @EXPORT = qw(
+               &INVALID_BOOLEAN_STRING_EXCEPTION
+    );
+       @EXPORT_OK = qw(
+               true_p
+    );
+       @ISA = qw(Exporter);
+}
 
 =head1 NAME
 
@@ -54,15 +63,6 @@ Boolean values in a consistent way which makes common sense.
 
 =cut
 
-@ISA = qw(Exporter);
-@EXPORT = (
-       &INVALID_BOOLEAN_STRING_EXCEPTION
-    );
-
-@EXPORT_OK = qw(
-       true_p
-    );
-
 sub INVALID_BOOLEAN_STRING_EXCEPTION ()
     { 'The given value does not seem to be interpretable as a Boolean value' }
 
@@ -94,14 +94,14 @@ sub true_p ($) {
     my($x) = @_;
     my $it;
     if (!defined $x || ref($x) ne '') {
-       die INVALID_BOOLEAN_STRING_EXCEPTION;
+       warn INVALID_BOOLEAN_STRING_EXCEPTION;
     }
     $x = lc($x);
     $x =~ s/\s//g;
     if (defined $strings{$x}) {
        $it = $strings{$x};
     } else {
-       die INVALID_BOOLEAN_STRING_EXCEPTION;
+       warn INVALID_BOOLEAN_STRING_EXCEPTION;
     }
     return $it;
 }
@@ -118,6 +118,6 @@ __END__
 
 =head1 AUTHOR
 
-Koha Developement team <info@koha.org>
+Koha Development Team <info@koha.org>
 
 =cut