X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=lib%2FCGI%2FEx%2FConf.pm;h=3af42e552e0d200d6174fbd9dc976ce888d5439b;hb=ba92ea5b36cbcd9c03016491dfb06dfc74baf409;hp=322fd1c1c80649fc7f3ad5fc52eb8fab4973d70b;hpb=d710d6cd21be21c0ab2df3566c2bd61d9015cac6;p=chaz%2Fp5-CGI-Ex diff --git a/lib/CGI/Ex/Conf.pm b/lib/CGI/Ex/Conf.pm index 322fd1c..3af42e5 100644 --- a/lib/CGI/Ex/Conf.pm +++ b/lib/CGI/Ex/Conf.pm @@ -7,7 +7,7 @@ CGI::Ex::Conf - Conf Reader/Writer for many different data format types =cut ###----------------------------------------------------------------### -# Copyright 2006 - Paul Seamons # +# Copyright 2007 - Paul Seamons # # Distributed under the Perl Artistic License without warranty # ###----------------------------------------------------------------### @@ -25,10 +25,11 @@ use vars qw($VERSION %CACHE $HTML_KEY @EXPORT_OK + $NO_WARN_ON_FAIL ); @EXPORT_OK = qw(conf_read conf_write in_cache); -$VERSION = '2.04'; +$VERSION = '2.16'; $DEFAULT_EXT = 'conf'; @@ -134,7 +135,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" }; - warn "Conf file $file not found" if ! $args->{'no_warn_on_fail'}; + warn "Conf file $file not found" if ! $args->{'no_warn_on_fail'} && ! $NO_WARN_ON_FAIL; return; } @@ -803,7 +804,7 @@ conf_read and conf_write method calls. =head1 FUNCTIONS -=over4 +=over 4 =item conf_read @@ -866,6 +867,10 @@ Should be a windows style ini file. See L Should be an xml file. It will be read in by XMLin. See L. +=item C + +Should be a json file. It will be read using the JSON library. See L. + =item C and C This is actually a custom type intended for use with CGI::Ex::Validate. @@ -904,13 +909,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