Devel::RunBlock - run coderef as block
Version 0.01
use Devel::RunBlock qw(runblock);
This module can three functions.
runblock $sub;
run $sub as code block. if returned in block, it returns from sub which calls runblock function.
$sub
return
runblock
my $rstate = runblock_state { code.. };
run $sub and return whether $sub is returned by return statement or leave scope.
$rstate==1 means returned by return statement. $rstate==0 means returned by left scope.
$rstate==1
$rstate==0
my $wa = long_wantarray $uplevel;
like a wantarray builtin function, but can test caller's wantarray state.
wantarray
long_return $uplevel; #long_return $uplevel, $rval..;
long jump return. currently, could not return values.
$uplevel=0 means no return (just return your sub). $uplevel=1 means normal return, just same as normal return statement.
YAMASHINA Hio, <hio at cpan.org>
<hio at cpan.org>
Please report any bugs or feature requests to bug-devel-runblock at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Devel-RunBlock. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-devel-runblock at rt.cpan.org
- long_return could not return values.
You can find documentation for this module with the perldoc command.
perldoc Devel::RunBlock
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Devel-RunBlock
CPAN Ratings
http://cpanratings.perl.org/d/Devel-RunBlock
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Devel-RunBlock
Search CPAN
http://search.cpan.org/dist/Devel-RunBlock
Copyright 2006 YAMASHINA Hio, 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 Devel::RunBlock, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Devel::RunBlock
CPAN shell
perl -MCPAN -e shell install Devel::RunBlock
For more information on module installation, please visit the detailed CPAN module installation guide.