Devel::Events::Generator::Require - Event generator for loading of code using require
require
version 0.09
use Devel::Events::Generator::Require; my $g = Devel::Events::Generator::Require->new( handler => $h ); $g->enable(); # all calls to require() will generate a try_require and a require_finished event $g->disable(); # events disabled
This generator allows instrumentation of module/file loading via require. This includes use statements.
use
Fired before require actually happens.
The file that require was given.
Note that when doing <require Foo::Bar>, the parameter passed into CORE::require is actually <Foo/Bar.pm>, and not the module name.
<require Foo::Bar
CORE::require
<Foo/Bar.pm
Fired at the end of every require, successful and unsuccessful.
The entry of file in %INC.
file
%INC
The load error, if any.
The value returend by the file. This is always a scalar.
Make this instance the enabled one (disabling any other instance which is enabled).
This only applies to the object_bless method.
object_bless
Disable this instance. Will stop generating object_bless events. =item try_require
Generates the try_require event.
try_require
Generates the require_finished event.
require_finished
Bugs may be submitted through the RT bug tracker (or bug-Devel-Events@rt.cpan.org).
יובל קוג'מן (Yuval Kogman) <nothingmuch@woobling.org>
This software is copyright (c) 2007 by יובל קוג'מן (Yuval Kogman).
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Devel::Events, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Devel::Events
CPAN shell
perl -MCPAN -e shell install Devel::Events
For more information on module installation, please visit the detailed CPAN module installation guide.