Skip to content
This repository has been archived by the owner on Mar 30, 2018. It is now read-only.

chocolateboy/Goto-Cached

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.