B-Hooks-OP-Check-StashChange
view release on metacpan or search on metacpan
---
abstract: 'Invoke callbacks when the stash code is being compiled in changes'
author:
- 'Florian Ragwitz <rafl@debian.org>'
build_requires:
B::Hooks::OP::Check: 0.14
ExtUtils::MakeMaker: 6.42
Test::More: 0
configure_requires:
B::Hooks::OP::Check: 0.14
ExtUtils::Depends: 0
ExtUtils::MakeMaker: 6.42
NAME
B::Hooks::OP::Check::StashChange - Invoke callbacks when the stash code
is being compiled in changes
SYNOPSIS
From Perl
package Foo;
use B::Hooks::OP::Check::StashChange;
our $id = B::Hooks::OP::Check::StashChange::register(sub {
my ($new, $old) = @_;
"unregister" is returned.
unregister
B::Hooks::OP::Check::StashChange::unregister($id);
Disable the callback referenced by $id.
C API
TYPES
OP *(*hook_op_check_stashchange_cb) (pTHX_ OP *op, const char *new_stash, const char *old_stash, void *user_data)
The type the callbacks need to implement.
FUNCTIONS
UV hook_op_check_stashchange (hook_op_check_stashchange_cb cb, void *user_data)
Register the callback "cb" to be when an opcode is compiled in a
different namespace than the previous. "user_data" will be passed to the
callback as the last argument.
Returns an id that can be used to remove the handler using
"hook_op_check_stashchange_remove".
lib/B/Hooks/OP/Check/StashChange.pm view on Meta::CPAN
sub dl_load_flags { 0x01 }
__PACKAGE__->bootstrap($VERSION);
1;
__END__
=head1 NAME
B::Hooks::OP::Check::StashChange - Invoke callbacks when the stash code is being compiled in changes
=head1 SYNOPSIS
=head2 From Perl
package Foo;
use B::Hooks::OP::Check::StashChange;
our $id = B::Hooks::OP::Check::StashChange::register(sub {
lib/B/Hooks/OP/Check/StashChange.pm view on Meta::CPAN
B::Hooks::OP::Check::StashChange::unregister($id);
Disable the callback referenced by C<$id>.
=head1 C API
=head2 TYPES
=head3 OP *(*hook_op_check_stashchange_cb) (pTHX_ OP *op, const char *new_stash, const char *old_stash, void *user_data)
The type the callbacks need to implement.
=head2 FUNCTIONS
=head3 UV hook_op_check_stashchange (hook_op_check_stashchange_cb cb, void *user_data)
Register the callback C<cb> to be when an opcode is compiled in a different
namespace than the previous. C<user_data> will be passed to the callback as the
last argument.
Returns an id that can be used to remove the handler using
( run in 1.062 second using v1.01-cache-2.11-cpan-9b1e4054eb1 )