chocolateboy / Goto-Cached

A fast drop-in replacement for Perl's O(n) goto

Home Page:http://search.cpan.org/dist/Goto-Cached/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Goto::Cached

CPAN Version License

NAME

Goto::Cached - a fast drop-in replacement for Perl's O(n) goto

SYNOPSIS

sub factorial($) {
    use Goto::Cached;
    my $n = shift;
    my $accumulator = 1;

    iter: return $accumulator if ($n < 2);
    $accumulator *= $n;
    --$n;
    goto iter;
}

DESCRIPTION

Goto::Cached provides a fast, lexically-scoped drop-in replacement for Perl's builtin goto. Its use is the same as the builtin. goto &sub and jumps out of the current scope (including if and unless blocks) are not cached.

VERSION

0.22

SEE ALSO

AUTHOR

chocolateboy

COPYRIGHT AND LICENSE

Copyright © 2005-2010 by chocolateboy.

This is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0.

About

A fast drop-in replacement for Perl's O(n) goto

http://search.cpan.org/dist/Goto-Cached/

License:Artistic License 2.0


Languages

Language:C 92.8%Language:Perl 4.4%Language:XS 2.9%