App::Getconf::Node - TODO: fill me
TODO: fill me
Following methods are available:
new(%opts)
Supported options:
type
check
storage
scalar, array, hash
scalar
array
hash
help
value
default
alias
uses_arg()
Method tells whether this option accepts an argument passed in command line (but it may be still possible not to pass an argument to this option; see requires_arg() method).
requires_arg()
Method tells whether this option requires an argument in command line.
help()
Retrieve help message for this option.
alias()
If the node is an alias, method returns what option it points to.
If the node is autonomous, method returns undef.
undef
set($value)
set($key, $value)
Set value of this option. The second form is for options with hash storage.
get()
Retrieve value of this option.
has_value()
Tell whether the value was set somehow (with command line, config or with initial value).
has_default()
type()
Determine what data type this option stores.
See new() for supported types.
new()
storage()
Determine what kind of storage this option uses.
Returned value: hash, array or scalar.
enum()
If the option is enum (check was specified as an array of values), arrayref of the values is returned. Otherwise, method returns undef.
verify($value)
Check correctness of $value for this option.
$value
Method will die() if the value is incorrect.
die()
For convenience, $value is returned. This way following is possible:
my $foo = $node->verify($value);
Stanislaw Klekot, <cpan at jarowit.net>
<cpan at jarowit.net>
Copyright 2012 Stanislaw Klekot.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
App::Getconf(3)
To install App::Getconf, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Getconf
CPAN shell
perl -MCPAN -e shell install App::Getconf
For more information on module installation, please visit the detailed CPAN module installation guide.