Devel-Events

 view release on metacpan or  search on metacpan

lib/Devel/Events/Filter/Stringify.pm  view on Meta::CPAN

This event filter will remove all reference data from events.

Events may contain references to the data they are reporting on. If the event
data is not thrown away immediately this might affect the flow of the program,
causing leaks.

This filter prevents leaks from happenning when an event logger is used by
simply stringifying all data.

Note that objects that overload stringification will *not* have their
stringification callbacks activated unless C<respect_overloading> is set to a
true value.

=head1 SUBCLASSING

In order ot perform custom dumps of objects that are more descriptive or even
useful for log replay, override the C<stringify> method.

=head1 ATTRIBUTES

=over 4

lib/Devel/Events/Handler/Callback.pm  view on Meta::CPAN


	my $h = Devel::Events::Handler::Callback->new(
		callback => sub {
			my ( $type, %data ) = @_;
			# ...
		},
	);

=head1 DESCRIPTION

This object will let you easily create handlers that are callbacks. This is
used extensively in the test suites.

=head1 ATTRIBUTES

=over 4

=item callback

Accepts a code reference.



( run in 0.391 second using v1.01-cache-2.11-cpan-9b1e4054eb1 )