{"id":20550226,"url":"https://github.com/dnmfarrell/tie-scalar-callback","last_synced_at":"2026-07-07T07:31:27.794Z","repository":{"id":56836512,"uuid":"50403334","full_name":"dnmfarrell/Tie-Scalar-Callback","owner":"dnmfarrell","description":"A scalar which executes a callback every time is used","archived":false,"fork":false,"pushed_at":"2016-10-01T14:00:37.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-16T16:49:19.796Z","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-26T04:30:34.000Z","updated_at":"2016-01-26T04:33:36.000Z","dependencies_parsed_at":"2022-09-20T22:10:23.131Z","dependency_job_id":null,"html_url":"https://github.com/dnmfarrell/Tie-Scalar-Callback","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-Callback","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnmfarrell%2FTie-Scalar-Callback/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnmfarrell%2FTie-Scalar-Callback/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnmfarrell%2FTie-Scalar-Callback/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dnmfarrell","download_url":"https://codeload.github.com/dnmfarrell/Tie-Scalar-Callback/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:23:55.925Z","updated_at":"2026-07-07T07:31:27.751Z","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::Callback - a tied scalar which executes a callback everytime it is used\n\n=head1 VERSION\n\nversion 0.062\n\n=head1 SYNOPSIS\n\n  use Tie::Scalar::Callback;\n\n  # this coderef doubles the scalar's value everytime it's fetched\n  my $coderef = sub {\n  \tstate $value  = 1/2;\n  \tstate $factor = 2;\n  \t$value *= $factor;\n    }\n  };\n\n  tie(my $doubler, 'Tie::Scalar::Callback', $coderef);\n\n  print $doubler; 1\n  print $doubler; 2\n  print $doubler; 4\n\n=head1 DESCRIPTION\n\nC\u003cTie::Scalar::Callback\u003e is a class for creating tied scalars which execute\na callback everytime an event occurs on the scalar. The callback's return\nvalue becomes the scalar's apparent value.\n\n=head1 ACKNOWLEDGEMENTS\n\nThanks to L\u003cbrian d foy|https://metacpan.org/author/BDFOY\u003e for coming up with the idea for this module.\n\n=head1 SEE ALSO\n\n=over 4\n\n=item *\n\nL\u003cTie::Cycle|https://metacpan.org/pod/Tie::Cycle\u003e\n\n=item *\n\nL\u003cTie::Scalar::Decay|https://metacpan.org/pod/Tie::Scalar::Decay\u003e\n\n=item *\n\nL\u003cTie::Scalar::Ratio|https://metacpan.org/pod/Tie::Scalar::Ratio\u003e\n\n=back\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-callback","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdnmfarrell%2Ftie-scalar-callback","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnmfarrell%2Ftie-scalar-callback/lists"}