The following module was proposed for inclusion in the Module List:
modid: Config::YAARG
DSLIP: cdphp
description: Simple constructor argument processor
userid: ALUCAS (Anthony J Lucas)
chapterid: 12 (Opt_Arg_Param_Proc)
communities:
#perl on freenode
similar:
AutoArgs
rationale:
Y = Yet A = Another ARG = Argument (Processor)
This module provides an easy framework to process and transform
general key-based arguments and values. Users simply specify by key
how to parse values and where to store them, and the rest is taken
care of. This module is designed to play extremely well with
plain-perl object-oriented classes and hierarchies, which are
handled transparently and in an efficient manner.
This effectively allows autobox / type-casting based on argument
keys. Any constructor or method which takes nested structures, such
as the structure [{ URI => 'http://dummy' }, ..], can simply tell
this module that URI should be transformed to instances of
'My::URI::Class'. You can also map keys to custom transform handlers
to perform complex actions.
This is under the Config namespace because it works extremely well
with deserialised formats, such as if you wished to feed your
object's constructor XML or JSON directly, and have this module
extract useful values and cast / transform them to perl data types
or objects as required.
enteredby: ALUCAS (Anthony J Lucas)
enteredon: Fri May 4 00:31:38 2012 GMT
The resulting entry would be:
Config::
::YAARG cdphp Simple constructor argument processor ALUCAS
Thanks for registering,
--
The PAUSE
PS: The following links are only valid for module list maintainers:
Registration form with editing capabilities:
https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=c5a00000_8c718abab8eee773&SUBMIT_pause99_add_mod_preview=1
Immediate (one click) registration:
https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=c5a00000_8c718abab8eee773&SUBMIT_pause99_add_mod_insertit=1
Peek at the current permissions:
https://pause.perl.org/pause/authenquery?pause99_peek_perms_by=me&pause99_peek_perms_query=Config%3A%3AYAARG