Tail calls for subroutines and methods
Clone or download
Pull request Compare This branch is 18 commits ahead of nothingmuch:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
inc/ExtUtils/MakeMaker/Dist/Zilla
lib/Sub/Call
t
.gitignore
CONTRIBUTING
Changes
INSTALL
LICENSE
Makefile.PL
README.pod
Tail.xs
dist.ini
ppport.h

README.pod

NAME

Sub::Call::Tail - Tail calls for subroutines and methods

VERSION

version 0.06

SYNOPSIS

use Sub::Call::Tail;

# instead of @_ = ( $object, @args ); goto $object->can("method")
tail $object->method(@args);

# instead of @_ = @blah; goto &foo
tail foo(@blah);

DESCRIPTION

This module provides a tail modifier for subroutine and method calls that will cause the invocation to have the same semantics as goto &sub.

When the tail modifier is compiled the inner subroutine call is transformed at compile time into a goto.

USAGE WARNING

<B>WARNING! The author does not endorse using this module for anything real. It was written primarily to demonstrate that such quackery can be achieved. Use at your own risk!

SEE ALSO

B::Hooks::OP::Check::EntersubForCV

CPS

AUTHOR

יובל קוג'מן (Yuval Kogman) <nothingmuch@woobling.org>

CONTRIBUTORS

  • Karen Etheridge <ether@cpan.org>

  • Florian Ragwitz <rafl@debian.org>

  • Andrew Main (Zefram) <zefram@fysh.org>

  • Zefram <zefram@fysh.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2009 by יובל קוג'מן (Yuval Kogman).

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.