Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Devel::Events::GeneratUserRContributed PerDevel::Events::Generator::Require(3)

NAME
       Devel::Events::Generator::Require - Event generator for loading of code
       using "require"

VERSION
       version 0.09

SYNOPSIS
	       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

DESCRIPTION
       This generator allows instrumentation of	module/file loading via
       "require".  This	includes "use" statements.

EVENTS
       try_require
	   Fired before	"require" actually happens.

	   file
	       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_finished
	   Fired at the	end of every require, successful and unsuccessful.

	   file
	       The file	that "require" was given.

	   matched_file
	       The entry of "file" in %INC.

	   error
	       The load	error, if any.

	   return_value
	       The value returend by the file. This is always a	scalar.

METHODS
       enable
	   Make	this instance the enabled one (disabling any other instance
	   which is enabled).

	   This	only applies to	the "object_bless" method.

       disable
	   Disable this	instance. Will stop generating "object_bless" events.
	   =item try_require

	   Generates the "try_require" event.

       require_finished
	   Generates the "require_finished" event.

SUPPORT
       Bugs may	be submitted through the RT bug	tracker
       <https://rt.cpan.org/Public/Dist/Display.html?Name=Devel-Events>	(or
       bug-Devel-Events@rt.cpan.org <mailto:bug-Devel-Events@rt.cpan.org>).

AUTHOR
       XXXX XXX'XX (Yuval Kogman) <nothingmuch@woobling.org>

COPYRIGHT AND LICENCE
       This software is	copyright (c) 2007 by XXXX XXX'XX (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.

perl v5.32.0			  2018-03-Devel::Events::Generator::Require(3)

NAME | VERSION | SYNOPSIS | DESCRIPTION | EVENTS | METHODS | SUPPORT | AUTHOR | COPYRIGHT AND LICENCE

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Devel::Events::Generator::Require&sektion=3&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help