{"id":20550272,"url":"https://github.com/dnmfarrell/tie-scalar-ratio","last_synced_at":"2026-04-11T23:46:13.488Z","repository":{"id":149704136,"uuid":"50156617","full_name":"dnmfarrell/Tie-Scalar-Ratio","owner":"dnmfarrell","description":"a scalar which multiplies its value each time it is accessed","archived":false,"fork":false,"pushed_at":"2016-01-22T04:03:50.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-16T16:49:28.207Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dnmfarrell.png","metadata":{"files":{"readme":"README.pod","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-22T04:02:12.000Z","updated_at":"2016-01-22T04:05:19.000Z","dependencies_parsed_at":"2023-04-18T15:14:02.639Z","dependency_job_id":null,"html_url":"https://github.com/dnmfarrell/Tie-Scalar-Ratio","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnmfarrell%2FTie-Scalar-Ratio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnmfarrell%2FTie-Scalar-Ratio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnmfarrell%2FTie-Scalar-Ratio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnmfarrell%2FTie-Scalar-Ratio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dnmfarrell","download_url":"https://codeload.github.com/dnmfarrell/Tie-Scalar-Ratio/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242157180,"owners_count":20081036,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T02:24:11.012Z","updated_at":"2026-04-11T23:46:08.463Z","avatar_url":"https://github.com/dnmfarrell.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"=pod\n\n=encoding UTF-8\n\n=head1 NAME\n\nTie::Scalar::Ratio - a scalar which multiplies in value every time it is accessed.\n\n=head1 VERSION\n\nversion 0.01\n\n=head1 SYNOPSIS\n\n  use Tie::Scalar::Ratio;\n\n  tie(my $doubler, 'Tie::Scalar::Ratio', 2, 1);\n\n  print $doubler; # 1\n  print $doubler; # 2\n  print $doubler; # 4\n  print $doubler; # 8\n\n  tie(my $halver, 'Tie::Scalar::Ratio', 0.5, 80);\n\n  print $halver; # 80\n  print $halver; # 40\n  print $halver; # 20\n  print $halver; # 10\n\n=head1 DESCRIPTION\n\nC\u003cTie::Scalar::Ratio\u003e is a class for creating tied scalars which multiply their\nvalue by a ratio everytime their value is read. I found this a useful way to\nmake a C\u003cretry()\u003e function increase its sleep duration after every attempt,\nwithout re-writing the function (I just passed a C\u003cTie::Scalar::Ratio\u003e object\nas the duration scalar).\n\nSimilarly by passing a ratio value less than 1, it can be used as a timeout or\ncountdown feature.\n\n=head1 SEE ALSO\n\nL\u003cTie::Scalar::Decay|https://metacpan.org/pod/Tie::Scalar::Decay\u003e\n\n=head1 AUTHOR\n\nDavid Farrell \u003cdfarrell@cpan.org\u003e\n\n=head1 COPYRIGHT AND LICENSE\n\nThis software is Copyright (c) 2016 by David Farrell.\n\nThis is free software, licensed under:\n\n  The (two-clause) FreeBSD License\n\n=cut\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnmfarrell%2Ftie-scalar-ratio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdnmfarrell%2Ftie-scalar-ratio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnmfarrell%2Ftie-scalar-ratio/lists"}