=begin pod :kind("Type") :subkind("class") :category("basic")

=TITLE class Routine::WrapHandle

=SUBTITLE Holds all information needed to unwrap a wrapped routine.

class WrapHandle { ... }

C<WrapHandle> is a I<Rakudo private class> created and returned by
L<wrap|/type/Routine#method_wrap>. Its only use is to unwrap wrapped routines.
Either call L<unwrap|/type/Routine#method_unwrap> on a routine object or call
the method C<restore> on a C<Routine::WrapHandle> object.

    sub f() { say 'f was called' }
    my $wrap-handle = &f.wrap({ say 'before'; callsame; say 'after' });
    f;                    # OUTPUT: «before␤f was called␤after␤»
    $wrap-handle.restore;
    f;                    # OUTPUT: «f was called␤»

As such private class, it may suffer any kind of changes without prior notice.
It is only mentioned here since it is visible by the user who checks the return
type of the C<Routine.wrap> method.

=head1 Methods

=head2 method restore

    method restore(--> Bool:D)

Unwraps a wrapped routine and returns C<Bool::True> on success.

=end pod

# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6
