Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 31.018.513 Times

Config::Strict 0.07

Company: Blake Willmarth
Date Added: October 15, 2013  |  Visits: 220


Report Broken Link
Printer Friendly Version

Product Homepage
Download (16 downloads)

Config::Strict is a Perl module that wraps Declare::Constraints::Simple to enable strict parameter name- and type-checking on configuration data. That is, it will complain anytime an attempt is made to access a parameter with an invalid name or type; or if an attempt is made to unset a required parameter. Both built-in and custom types can be used to build a validation profile for the entire configuration.<br /><br />This module is meant to be used alongside any configuration parser that hashes configuration data.<br /><br />SYNOPSIS<br /><br /> use Config::Strict;<br /> use Declare::Constraints::Simple -All; # For custom checks<br /><br /> my $config = Config::Strict->new( {<br /> params => { # Parameter types & names<br /> Bool => [ qw( my_bool1 my_bool2 ) ], # Multiple parameters<br /> Int => 'my_i', # Single parameter<br /> Num => 'my_n',<br /> HashRef => 'my_href',<br /> Enum => {<br /> my_enum => [ qw( v1 v2 ), undef ]<br /> },<br /> Anon => { # anonymous profiles<br /> my_pos2 => # Positive number<br /> And( IsNumber, Matches( qr/^[^-]+$/ ) ),<br /> my_nest => IsA( 'Config::Strict' ), # Nested configuration<br /> }<br /> },<br /> required => [ qw( my_bool1 my_n ) ], # Required parameters<br /> defaults => { # Default values<br /> my_bool1 => 1,<br /> my_enum => 'e2',<br /> my_n => -1.1,<br /> my_pos2 => 1_000,<br /> },<br /> } );<br /> <br /> # Access and change the data<br /> <br /> # Retrieve a single value<br /> $got = $config->get( 'my_n' ); # $got = -1.1<br /> <br /> # Retrieve a list of values<br /> @got = $config->get( qw( my_bool1 my_n ) ); # @got = ( 1, -1.1 )<br /> <br /> # Set multiple parameters<br /> $config->set( my_bool1 => 1, 'my_pos2' => 2 );<br /> <br /> # Unset parameters<br /> $config->unset( 'my_n' );<br /> $config->param_is_set( 'my_n' ); # false<br /> <br /> # The following will die:<br /> $config->get( 'foo' ); # foo doesn't exist<br /> $config->set( 'my_i' => 2.2 ); # my_i must be an integer<br /> $config->set( 'my_pos2' => -5 ); # my_pos2 must be positive<br /> $config->unset( 'my_n' ); # my_n is required

Requirements: No special requirements
Platforms: *nix, Linux
Keyword: 039my I039 039my N039 Attempt Bool Config Config Strict Configgtget Configgtset Configstrict Configuration Custom Declareconstraintssimple Enum Module Parameter Parameters Pos Required Retrieve Strict Types Values
Users rating: 0/10

License: Freeware Size: 10.24 KB
Libraries  -  Config::Sofu 0.3
Config::Sofu is a simple Sofu configuration file parser. SYNOPSIS use vars qw/%CONFIG/; use Config::Sofu "config.sofu"; if ($CONFIG{FOOBAR}) { ... } if ($CONFIG{Bar}->[7]->{Foo} eq "Foobar") { ... } Save the new configuration:...
2.05 KB  
Libraries  -  Config::Scoped 0.11
Config:Scoped is a feature rich configuration file parser..
66.56 KB  
Libraries  -  Config::Fast 1.07
Config::Fast is an extremely fast configuration file parser. SYNOPSIS # default config format is a space-separated file company "Supercool, Inc." support # and then in Perl use Config::Fast; %cf = fastconfig; print...
10.24 KB  
Utilities  -  Config::Maker 0.007
Config::Maker is a tool and a perl library for creating text files from templates and configuration values. It's best suited for generating several related config files for which the actual configuration should be stored in one place. I wrote it...
40.96 KB  
Libraries  -  Simple Config 1.1.1
Simple Config library supports configuration files consisting of simple name-value pairs, similar to the old Windows INI files. A config file can be loaded into memory, queried by item name, modified, and written back out to a file. Configuration...
23.55 KB  
Libraries  -  DNS::Config 0.66
DNS::Config is a Perl module with DNS Configuration. SYNOPSIS use DNS::Config; my $config = new DNS::Config(); $config->debug(); ABSTRACT This class represents a configuration for a domain name service daemon (DNS). A domain name...
14.34 KB  
Libraries  -  OpenInteract2::Config::Initializer 1.99_06
OpenInteract2::Config::Initializer is a Perl module for observable configuration initialization events. SYNOPSIS # Add an initializer in your package.conf name mypackage version 1.10 ... config_watcher OpenInteract2::MyInitializerSpops...
931.84 KB  
Libraries  -  DOCSIS Config .3
DOCSIS Config provides a PHP library to encode binary configuration files for DOCSIS cable modems..
34.82 KB  
Libraries  -  Template::Plugin::Config::General 0.01
Template::Plugin::Config::General is a template toolkit plugin which implements wrapper around Config::General module. SYNOPSIS # Config file format ; app.cfg - common configuration for scripts and both ; static and dynamic template pages....
3.07 KB  
Libraries  -  Perl::Critic::Config 1.061
Perl::Critic::Config is a Perl module to find and load Perl::Critic user-preferences. Perl::Critic::Config takes care of finding and processing user-preferences for Perl::Critic. The Config object defines which Policy modules will be loaded into...
245.76 KB  
Linux Software  -  Polling Autodialer Software 3.4
ICTBroadcast Auto Dialer software has a survey campaign for telephone surveys and polls. This auto dialer software automatically dials a list of numbers and asks them a set of questions that they can respond to, by using their telephone keypad....
488 B  
Linux Software  -  Total Video Converter Mac Free 3.5.5
Total Video Converter Mac Free developed by EffectMatrix Ltd is the official legal version of Total Video Converter which was a globally recognized brand since 2006. Total Video Converter Mac Free is a free but powerful all-in-one video...
17.7 MB  
Linux Software  -  Skeith mod_log_sql Analyzer 2.10beta2
Skeith is a php based front end for analyzing logs for Apache using mod_log_sql.
47.5 KB  
Linux Software  -  SLAX 6.0+
Slax is a modern, portable, small and fast Linux operating system with a modular approach and outstanding design. Despite its small size, Slax provides a wide collection of pre-installed software for daily use, including a well organized graphical...
190 KB  
Linux Software  -  GTK+ 2.5
GTK+, which stands for the GIMP Toolkit, is a library for creating graphical user interfaces for the X Window System. It is designed to be small, efficient, and flexible. GTK+ is written in C with a very object-oriented approach. Language bindings...
60 MB  
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by, it is used to describe information about an application such as the name and...
327.68 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB