App-FinanceUtils
view release on metacpan or search on metacpan
"Test::Pod" : "1.41",
"Test::Pod::Coverage" : "1.08",
"Test::Rinci" : "0.151"
},
"x_spec" : {
"Rinci" : "v1.1.90"
}
},
"runtime" : {
"requires" : {
"Data::Sah::Coerce::perl::To_float::From_str::percent" : "0",
"Data::Sah::Compiler::perl::TH::float" : "0",
"Perinci::CmdLine::Any" : "0",
"Perinci::CmdLine::Lite" : "1.820",
"Perinci::Sub::Gen::FromFormulas" : "0",
"perl" : "5.010001",
"strict" : "0",
"warnings" : "0"
}
},
"test" : {
configure_requires:
ExtUtils::MakeMaker: '0'
dynamic_config: 0
generated_by: 'Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: '1.4'
name: App-FinanceUtils
requires:
Data::Sah::Coerce::perl::To_float::From_str::percent: '0'
Data::Sah::Compiler::perl::TH::float: '0'
Perinci::CmdLine::Any: '0'
Perinci::CmdLine::Lite: '1.820'
Perinci::Sub::Gen::FromFormulas: '0'
perl: '5.010001'
strict: '0'
warnings: '0'
resources:
bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=App-FinanceUtils
homepage: https://metacpan.org/release/App-FinanceUtils
Makefile.PL view on Meta::CPAN
"EXE_FILES" => [
"script/calc-fv-future-value",
"script/calc-fv-periods",
"script/calc-fv-present-value",
"script/calc-fv-return-rate"
],
"LICENSE" => "perl",
"MIN_PERL_VERSION" => "5.010001",
"NAME" => "App::FinanceUtils",
"PREREQ_PM" => {
"Data::Sah::Coerce::perl::To_float::From_str::percent" => 0,
"Data::Sah::Compiler::perl::TH::float" => 0,
"Perinci::CmdLine::Any" => 0,
"Perinci::CmdLine::Lite" => "1.820",
"Perinci::Sub::Gen::FromFormulas" => 0,
"strict" => 0,
"warnings" => 0
},
"TEST_REQUIRES" => {
"File::Spec" => 0,
"IO::Handle" => 0,
Makefile.PL view on Meta::CPAN
"Test::More" => 0
},
"VERSION" => "0.003",
"test" => {
"TESTS" => "t/*.t"
}
);
my %FallbackPrereqs = (
"Data::Sah::Coerce::perl::To_float::From_str::percent" => 0,
"Data::Sah::Compiler::perl::TH::float" => 0,
"File::Spec" => 0,
"IO::Handle" => 0,
"IPC::Open3" => 0,
"Perinci::CmdLine::Any" => 0,
"Perinci::CmdLine::Lite" => "1.820",
"Perinci::Sub::Gen::FromFormulas" => 0,
"Test::More" => 0,
"strict" => 0,
"warnings" => 0
lib/App/FinanceUtils.pm view on Meta::CPAN
caption => 'future value',
schema => ['float*'],
},
pv => {
caption => 'present value',
schema => ['float*'],
},
r => {
caption => 'return rate',
summary => 'Return rate (e.g. 0.06 for 6%)',
schema => ['float*', 'x.perl.coerce_rules'=>['From_str::percent']],
},
n => {
caption => 'periods',
summary => 'Number of periods',
schema => ['float*'],
},
},
formulas => [
{
formula => 'fv = pv*(1+r)**n',
examples => [
{
summary => 'Invest $100 at 6% annual return rate for 5 years',
args => {pv=>100, r=>0.06, n=>5},
},
{
summary => 'Ditto, using percentage notation on command-line',
src => '[[prog]] 100 6% 5',
src_plang => 'bash',
},
],
},
{
formula => 'pv = fv/(1+r)**n',
examples => [
{
summary => 'Want to get $100 after 5 years at 6% annual return rate, how much to invest?',
script/calc-fv-future-value view on Meta::CPAN
% calc-fv-future-value [options] <pv> <r> <n>
Examples:
Invest $100 at 6% annual return rate for 5 years:
% calc-fv-future-value 100 0.06 5
133.82255776
Ditto, using percentage notation on command-line:
% calc-fv-future-value 100 6% 5
133.82255776
=head1 DESCRIPTION
Formula is:
fv = pv*(1+r)**n
( run in 0.464 second using v1.01-cache-2.11-cpan-05162d3a2b1 )