Sub::Call::Tail - Tail calls for subroutines and methods
use Sub::Call::Tail; # instead of @_ = ( $object, @args ); goto $object->can("method") tail $object->method(@args); # instead of @_ = @blah; goto &foo tail foo(@blah);
This module provides a tail modifier for subroutine and method calls that will cause the invocation to have the same semantics as goto &sub.
tail
goto &sub
When the tail modifier is compiled the inner subroutine call is transformed at compile time into a goto.
B::Hooks::OP::Check::EntersubForCV
CPS
http://github.com/nothingmuch/Sub-Call-Tail
Yuval Kogman
Andrew Main (Zefram)
Copyright (c) 2009 Yuval Kogman. All rights reserved This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Sub::Call::Tail, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Sub::Call::Tail
CPAN shell
perl -MCPAN -e shell install Sub::Call::Tail
For more information on module installation, please visit the detailed CPAN module installation guide.