Devel::Events - Extensible instrumentation framework.
use Devel::Events::Generator::Foo; use Devel::Events::Handler::Bar; use Devel::Events::Filter::Blort; my $h = Devel::Events::Generator->new( handler => Devel::Event::Filter->new( handler => Devel::Events::Handler::Bar->new(), ), );
Devel::Events is an event generation, filtering and analaysis framework for instrumenting and auditing perl code.
The design's purpose is to decouple the mechanics of code instrumentation from the analysis, making it easier to write debugging/profiling tools.
Devel::Events::Generator object fire events, which can be mangled by Devel::Event::Filter objects. Eventually any number of Devel::Event::Handler objects can receive a given event, and perform analysis based on it.
For example Devel::Event::Handler::ObjectTracker can be used to detect leaks.
There are two main types of components - generators and handlers.
Filters are special types of handlers that always delegate to another handler.
The multiplex handler may be used to delegate to any number of handlers, and can be the handler for several generators.
Using these basic components complex chains of handlers can be built to properly analyze the events you are interested in.
object_destroyevents by overriding
CORE::GLOBAL::blessand tracking every object using Variable::Magic.
executing_lineevent for every line using the perl debugger hook.
Fires events for
require and c<use> calls.
Log all events to an array.
Provides filtering and slicing methods to ease analysis.
object_destroyevents (as generated by Devel::Events::Generator::Objects) to track the lifetime of objects. When objects lifetimes extend beyond the scope they're supposed to be destroyed in leaks can be detected.}