Acme::Gosub - Implement BASIC-like "gosub" and "greturn" in Perl
version 0.1.9
use Acme::Gosub; sub pythagoras { my ($x, $y) = (@_); my ($temp, $square, $sum); $sum = 0; $temp = $x; gosub SQUARE; $sum += $square; $temp = $y; gosub SQUARE; $sum += $square; return $sum; SQUARE: $square = $temp * $temp; greturn; }
Using this function enables using the "gosub" and "greturn" statements inside your program. "gosub" is identical to "goto" except that it records the place from which it was invoked. Then, when a "greturn" is used, it jumps back to the place of the last goto that was not "greturned" yet. If you're not a BASIC programmer you can think of it as a poor man's recursion.
For more information consult the examples in the test files.
Does the actual filtering to the code.
The workhorse of the module - does most of the work of transforming the code.
Taken from Switch.pm.
Cancels the filter.
Damian Conway is the original author of Switch.pm, on which this module is based.
Shlomi Fish ( http://www.shlomifish.org/ ) converted Switch.pm to become Acme::Gosub.
Copyright (c) 1997-2003, Damian Conway. All Rights Reserved. Modified by Shlomi Fish, 2005 - all rights disclaimed.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Acme::ComeFrom .
The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources.
MetaCPAN
A modern, open-source CPAN search engine, useful to view POD in HTML format.
https://metacpan.org/release/Acme-Gosub
RT: CPAN's Bug Tracker
The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN.
https://rt.cpan.org/Public/Dist/Display.html?Name=Acme-Gosub
CPANTS
The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution.
http://cpants.cpanauthors.org/dist/Acme-Gosub
CPAN Testers
The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions.
http://www.cpantesters.org/distro/A/Acme-Gosub
CPAN Testers Matrix
The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms.
http://matrix.cpantesters.org/?dist=Acme-Gosub
CPAN Testers Dependencies
The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution.
http://deps.cpantesters.org/?module=Acme::Gosub
Please report any bugs or feature requests by email to bug-acme-gosub at rt.cpan.org, or through the web interface at https://rt.cpan.org/Public/Bug/Report.html?Queue=Acme-Gosub. You will be automatically notified of any progress on the request by the system.
bug-acme-gosub at rt.cpan.org
The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :)
https://github.com/shlomif/perl-acme-gosub
git clone git://github.com/shlomif/perl-acme-gosub.git
Shlomi Fish <shlomif@cpan.org>
Please report any bugs or feature requests on the bugtracker website https://github.com/shlomif/perl-acme-gosub/issues
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
This software is copyright (c) 2020 by Shlomi Fish.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Acme::Gosub, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Acme::Gosub
CPAN shell
perl -MCPAN -e shell install Acme::Gosub
For more information on module installation, please visit the detailed CPAN module installation guide.