
Scope::OnExit - Running code on scope exit

Version 0.02

Execute code on scope exit
use Scope::OnExit;
{
my $var = foo();
on_scope_exit { do_something($var) };
something_else();
} # scope exit, do_something($var) is run now.

This will make the block run at scope exit.

Leon Timmermans, <leont at cpan.org>

Please report any bugs or feature requests to bug-scope-onexit at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Scope-OnExit. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

You can find documentation for this module with the perldoc command.
perldoc Scope::OnExit
You can also look for information at:

Copyright 2009 Leon Timmermans, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.