1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-24 00:45:52 +00:00

- Update from v1.05 to v1.07

- Expand pkg-descr

revision 1.7
date: 2006/03/06 22:18:41;  author: nwiger;  state: Exp;  lines: +140 -76
- changed defines to MixedCase for DataDumper consistency
- added @Define array that's pre-parsed
- wrapped everything inside an eval'ed package for safety
----------------------------
revision 1.6
date: 2006/02/26 18:52:03;  author: nwiger;  state: Exp;  lines: +47 -15
- fixed internal $Var substitution errors
- Added $ARRAYS setting to parse bourne array[n] syntax

PR:		ports/98241
Submitted by:	aaron
Reviewed by:	maintainer
Approved by:	maintainer, tobez (implicit)
This commit is contained in:
Aaron Dalton 2006-06-05 00:00:35 +00:00
parent 4b860804c9
commit 572cad725f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=164374
3 changed files with 45 additions and 7 deletions

View File

@ -6,7 +6,7 @@
#
PORTNAME= Config-Fast
PORTVERSION= 1.05
PORTVERSION= 1.07
CATEGORIES= devel perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
MASTER_SITE_SUBDIR= Config
@ -22,7 +22,7 @@ MAN3= Config::Fast.3
.include <bsd.port.pre.mk>
.if ${PERL_LEVEL} < 500600
IGNORE= needs at least perl 5.6 to build
IGNORE= needs at least perl 5.6 to run
.endif
.include <bsd.port.post.mk>

View File

@ -1,3 +1,3 @@
MD5 (Config-Fast-1.05.tar.gz) = 8fc7c2445a13e45296ee8aea6c940b06
SHA256 (Config-Fast-1.05.tar.gz) = cb750116bb4bc8fff8ab375ebf1da672e4fd16fd309c02495009b5572fdc61cb
SIZE (Config-Fast-1.05.tar.gz) = 8292
MD5 (Config-Fast-1.07.tar.gz) = 7228e3419b50d74b07d3033d9ca6928e
SHA256 (Config-Fast-1.07.tar.gz) = 7b03043b2a722384af570cea7083f68c437744cea902cfa89ed00b6821cc5d8f
SIZE (Config-Fast-1.07.tar.gz) = 10020

View File

@ -1,4 +1,42 @@
This Config::Fast module. This allow extremely fast configuration files to
be parsed.
This module is designed to provide an extremely lightweight way to parse
moderately complex configuration files. As such, it exports a single
function - fastconfig() - and does not provide any OO access methods.
Still, it is fairly full-featured.
Here's how it works:
%cf = fastconfig($file, $delim);
Basically, the fastconfig() function returns a hash of keys and values
based on the directives in your configuration file. By default, directives
and values are separated by whitespace in the config file, but this can be
easily changed with the delimiter argument (see below).
When the configuration file is read, its modification time is first
checked and the results cached. On each call to fastconfig(), if the
config file has been changed, then the file is reread. Otherwise, the
cached results are returned automatically. This makes this module great
for mod_perl modules and scripts, one of the primary reasons I wrote it.
Simply include this at the top of your script or inside of your
constructor function:
my %cf = fastconfig('/path/to/config/file.conf');
If the file argument is omitted, then fastconfig() looks for a file named
$0.conf in the ../etc directory relative to the executable. For example,
if you ran:
/usr/local/bin/myapp
Then fastconfig() will automatically look for:
/usr/local/etc/myapp.conf
This is great if you're really lazy and always in a hurry, like I am.
If this doesn't work for you, simply supply a filename manually. Note that
filename generation does not work in mod_perl, so you'll need to supply a
filename manually.
WWW: http://search.cpan.org/dist/Config-Fast/
Author: Nathan Wiger <nate@wiger.org>