1 package App::Rgit::Guard;
8 App::Rgit::Guard - Scope guard helper for App::Rgit.
16 our $VERSION = '0.06';
20 This class implements a simple scope guard object.
22 This is an internal module to L<rgit>.
26 =head2 C<new $callback>
28 Creates a new C<App::Rgit::Guard> object that will call C<$callback> when it is destroyed.
34 $class = ref $class || $class;
36 bless \($_[0]), $class;
41 Invokes the callback when the guard object goes out of scope.
45 sub DESTROY { ${$_[0]}->() }
53 Vincent Pit, C<< <perl at profvince.com> >>, L<http://profvince.com>.
55 You can contact me by mail or on C<irc.perl.org> (vincent).
59 Please report any bugs or feature requests to C<bug-rgit at rt.cpan.org>, or through the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=rgit>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
63 You can find documentation for this module with the perldoc command.
65 perldoc App::Rgit::Guard
67 =head1 COPYRIGHT & LICENSE
69 Copyright 2008,2009,2010 Vincent Pit, all rights reserved.
71 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
75 1; # End of App::Rgit::Guard