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=ac551809d9fd76c339534dcbde0e0b22b6a9c785;hb=490b94ab4051adf93abf16a4ed34efb923d6e8fc;hpb=6c57b3331d84010b9e2031f8e3c8937c3117e8fc diff --git a/lib/CGI/Ex/Conf.pm b/lib/CGI/Ex/Conf.pm index ac55180..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.11'; +$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