Objects of this class are passed to the handler() method of App::Info event handlers. Generally, this class will be of most interest to App::Info::Handler subclass implementers.

The event triggering methods in App::Info each construct a new App::Info::Request object and initialize it with their arguments. The App::Info::Request object is then the sole argument passed to the handler() method of any and all App::Info::Handler objects in the event handling chain. Thus, if you'd like to create your own App::Info event handler, this is the object you need to be familiar with. Consult the App::Info::Handler documentation for details on creating custom event handlers.

Each of the App::Info event triggering methods constructs an App::Info::Request object with different attribute values. Be sure to consult the documentation for the event triggering methods in App::Info, where the values assigned to the App::Info::Request object are documented. Then, in your event handler subclass, check the value returned by the type() method to determine what type of event request you're handling to handle the request appropriately.

This method is used internally by App::Info to construct new App::Info::Request objects to pass to event handler objects. Generally, you won't need to use it, other than perhaps for testing custom App::Info::Handler classes.

The parameters to new() are passed as a hash of named parameters that correspond to their like-named methods. The supported parameters are:

Returns the key stored in the App::Info::Request object. The key is used by the App::Info subclass to uniquely identify the information it is harvesting, such as the path to an executable. It might be used by request handlers, for example, to see if an option was passed on the command-line.

Executes the callback anonymous subroutine supplied by the App::Info concrete base class that triggered the event. If the callback returns false, then $value is invalid. If the callback returns true, then $value is valid and can be assigned via the value() method.

Note that the value() method itself calls callback() if it was passed a value to assign. See its documentation below for more information.

When called without an argument, value() simply returns the value currently stored by the App::Info::Request object. Typically, the value is the default value for a confirm event, or a value assigned to an unknown event.

When passed an argument, value() attempts to store the the argument as a new value. However, value() calls callback() on the new value, and if callback() returns false, then value() returns false and does not store the new value. If callback() returns true, on the other hand, then value() goes ahead and stores the new value and returns true.