devel/p5-Config-Fast 1.07_1 FreeBSD
Extremely fast configuration file parser
- System
- FreeBSD
- Repository
- FreeBSD ports
- Maintainer
- [email protected]
- Categories
- devel, perl5
- Package size
- 11.1 KiB, 17.4 KiB installed
Description
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.
In the other systems
| System | Port | Version |
|---|---|---|
| FreeBSD | devel/p5-Config-Fast | 1.07_1 |
| DragonFly | devel/p5-Config-Fast | 1.07_1 |
Install
Binary package:
pkg install p5-Config-Fast
From the ports tree:
cd /usr/ports/devel/p5-Config-Fast/ && make install clean
To depend on this port in another port's Makefile:
RUN_DEPENDS= p5-Config-Fast>0:devel/p5-Config-Fast
Packages
The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.
| Repository | aarch64 | amd64 | armv6 | armv7 | i386 |
|---|---|---|---|---|---|
| FreeBSD:14:latest | 1.07_1 | 1.07_1 | 1.07_1 | 1.07_1 | 1.07_1 |
| FreeBSD:14:quarterly | 1.07_1 | 1.07_1 | n/a | 1.07_1 | 1.07_1 |
| FreeBSD:15:latest | 1.07_1 | 1.07_1 | n/a | 1.07_1 | 1.07_1 |
| FreeBSD:15:quarterly | 1.07_1 | 1.07_1 | n/a | n/a | n/a |
| FreeBSD:16:latest | 1.07_1 | 1.07_1 | n/a | n/a | n/a |
| FreeBSD:16:quarterly | n/a | n/a | n/a | n/a | n/a |
Dependencies
The Makefile names none itself; they come from USES and USE_*.
The full lists below include those, and their dependencies in turn.
Build dependencies 1
Run dependencies 1
No port depends on this one.
Configuration
No options to configure.
- USES
- perl5
- Service scripts
- none
Files
pkg-plist 2
- %%SITE_PERL%%/Config/Fast.pm
- %%PERL5_MAN3%%/Config::Fast.3.gz
distinfo 1
| File | Size | SHA256 |
|---|---|---|
| Config-Fast-1.07.tar.gz | 10020 | 7b03043b2a722384af570cea7083f68c437744cea902cfa89ed00b6821cc5d8f |
Master sites 1
- CPAN
Commit history 0
No commits in the history this site was built from.