WWW::Webrobot::Properties - Implements a config format like java.util.Properties
my $config = WWW::Webrobot::Properties->new( listmode => [qw(names auth_basic output http_header proxy no_proxy)], key_value => [qw(names http_header proxy)], multi_value => [qw(auth_basic)], structurize => [qw(load mail)], ); my $cfg = $config->load_file($cfg_name, $cmd_param);
This class implements a config format like java.util.Properties, see http://java.sun.com/j2se/1.3/docs/api/java/util/Properties.html for more docs.
Note: Some features are not implemented but there are some extensions for lists.
\uxxxx Unicode characters
Listmode properties may be written
listprop=value0 listprop=value1 listprop=value2
or
listprop.0=value0 listprop.1=value1 listprop.2=value2
These properties are made available as perl-arrays.
Construct an object. Options marked (F) affect the semantics of the properties format. All options affect the internal representation in Perl. The syntax is
option => [...]
Multiple definitions enforce an array of options. Multiple definition options may (but needn't) be written with additional digits:
names.1=xxx names.27=yyy
names=xxx names=yyy
Thats for compatibility to java.util.Properties.
Option value as 'key=value' deparsed.
names = key=value
Option value as '/v0/v1/v2/v3...' deparsed as array / is any literal character names = /v0/v1/v2/v3/
Common prefix options deparse as hash, e.g.
load.num=xx load.base=yy
yields in the internal config format
load => {num => "xx", base => "yy"}
For a complete guide of the semantics of the options see the tests t/properties.t.
To install WWW::Webrobot, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Webrobot
CPAN shell
perl -MCPAN -e shell install WWW::Webrobot
For more information on module installation, please visit the detailed CPAN module installation guide.