- or download this
$config = {
verbosity => 3,
...
...
# hundreds of configuration settings
};
- or download this
$params = {
from => ...,
...
# call it
my $ret = distance($params);
die $ret->{errormsg} unless $ret->{status} == 1;
- or download this
# I am skipping some boilerplate
package Calc;
...
distance => 42
};
}
- or download this
my $calcobj = Calc->new('settings.config');
my $res = $calcobj->distance({
...
# override system-wide config setting
timeout => ...,
});