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

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

Serving Software Downloads in 956 Categories, Downloaded 50.213.932 Times

Config::Strict 0.07

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

Config::Strict

Report Broken Link
Printer Friendly Version


Product Homepage
Download (38 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
USER REVIEWS
More Reviews or Write Review


CONFIG::STRICT RELATED
Networking Tools  -  network-config 0.1
network-config is a simple network configuration tool. Network-config is a simple and easy to use program that helps configuring the network interfaces for linux-based operating systems. It allows to have multiple configurations for the same...
32.77 KB  
Libraries  -  MRTG::Config 0.04
MRTG::Config is a Perl module for parsing MRTG configuration files. WARNING This module, while reliable right now, is still in ALPHA stages of development... The API/methods may change. Behaviors of methods will almost certainly change. The...
12.29 KB  
Modules  -  Selenium to SimpleTest 7.x-1.x-de
Convert Selenium IDE PHP output to Drupal SimpleTest format.To use: 1. Download the Selenium IDE. 2. Record a test or portion of a test. 3. Export the test as PHP (File -> Export Test Case As -> PHP). 4. Paste contents of exported test into...
10 KB  
Libraries  -  Config::FreeForm 0.01
Config::FreeForm is a Perl module that provides in-memory configuration data. SYNOPSIS use Config::FreeForm %options; Config::FreeForm provides in-memory configuration data in a free-form manner. Many existing configuration modules attempt...
5.12 KB  
Libraries  -  Java::SJ::Config 0.01
Java::SJ::Config is a Perl module that represents SJ Configuration File. It uses XML::XPath to parse configuration files and generates objects to represent the directives. Unless youre working on the module what you really want to know is what...
18.43 KB  
Network & Internet  -  django-config-gen 1.0.8
Generates configuration files for Apache, Nginx, etc. using values in settings.py and the Django template system. You can write your own templates for whatever text based config file you need.
10.24 KB  
Networking  -  Flickr Tag Cloud Widget 1.5
This is plugin for the Widget Sidebar in Wordpress. It will display your flickr tags as a tag cloud in your blog's sidebar.Installation : 1. Extract the flickr-tagcloud-widget.php file into your wp-content/plugins/widgets/ directory. 2. Go to your...
10 KB  
Networking Tools  -  Cisco IP Accounting Fetcher 1.4.3
Cisco IP Accounting Fetcher is a set of Perl scripts that allows you to fetch IP accounting data from Cisco routers. There is the only one config file - "getdata.conf for configuration..
12.29 KB  
Utilities  -  AfterStep 2.2.6
AfterStep is a window manager for the Unix X Window System. Originally based on the look and feel of the NeXTStep interface, it provides end users with a consistent, clean, and elegant desktop. AfterSteps goal is to provide for flexibility of...
5.9 MB  
Backup Utilities  -  SBackup 0.10.4
SBackup is a simple backup solution intended for desktop use. SBackup can back up any subset of files and directories. Exclusions can be defined by regular expressions. A maximum individual file size limit can be defined. Backups may be saved to...
36.86 KB  
NEW DOWNLOADS IN LINUX SOFTWARE, PROGRAMMING
Linux Software  -  EasyEDA PCB Designer for Linux 2.0.0
EasyEDA, a great web based EDA(Electronics Design Automation) tool, online PCB tool, online PCB software for electronics engineers, educators, students, makers and enthusiasts. Theres no need to install any software. Just open EasyEDA in any...
34.4 MB  
Linux Software  -  wpCache® WordPress HTTP Cache 1.9
wpCache® is a high-performance, distributed object, caching system application, generic in nature, but intended for use in speeding up dynamic web applications, by decreasing database load time. wpCache® decreases dramatically the page...
3.51 MB  
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  
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  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB