X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fp5-CGI-Ex;a=blobdiff_plain;f=lib%2FCGI%2FEx%2FConf.pm;h=365ece2d057b1fbd4640364a1502aea478e5e6d0;hp=c6e18233f5048a9052179ed8baa62fcbf6dc2861;hb=490b94ab4051adf93abf16a4ed34efb923d6e8fc;hpb=f30b8252fcf71659a2fd3b5895e009ff8e39299d diff --git a/lib/CGI/Ex/Conf.pm b/lib/CGI/Ex/Conf.pm index c6e1823..365ece2 100644 --- a/lib/CGI/Ex/Conf.pm +++ b/lib/CGI/Ex/Conf.pm @@ -29,7 +29,7 @@ use vars qw($VERSION ); @EXPORT_OK = qw(conf_read conf_write in_cache); -$VERSION = '2.10'; +$VERSION = '2.22'; $DEFAULT_EXT = 'conf'; @@ -134,7 +134,7 @@ sub conf_read { ### don't die if the file is not found - do die otherwise if (! -e $file) { - eval { die "Conf file $file not found" }; + eval { die "Conf file $file not found\n" }; warn "Conf file $file not found" if ! $args->{'no_warn_on_fail'} && ! $NO_WARN_ON_FAIL; return; } @@ -262,6 +262,7 @@ sub read_handler_json { open (IN, $file) || die "Couldn't open $file: $!"; CORE::read(IN, my $text, -s $file); close IN; + require JSON; return scalar JSON::jsonToObj($text); } @@ -909,13 +910,13 @@ without even opening the file. Make a similar write method that handles immutability. -=head1 AUTHOR - -Paul Seamons - =head1 LICENSE This module may be distributed under the same terms as Perl itself. +=head1 AUTHOR + +Paul Seamons + =cut