ACCEPTED EVENTS

grab

Instructs the component to grab a doctype from a specified page. Takes a hashref as an argument, the possible keys/value of that hashref are as follows:

event

{ event => 'results_event', }

Mandatory. Specifies the name of the event to emit when results are ready. See OUTPUT section for more information.

page

{ page => 'http://zoffix.com/' }

Mandatory. Specifies the page of which to grab the doctype.

raw

{ raw => 1 },

Optional. If specified then WWW::DoctypeGrabber's raw() method will be called and the value you specified to the raw argument will be passed along as an argument to raw() method. Note that this will affect any future "grabs".

The event handler set up to handle the event which you've specified in the event argument to grab() method/event will receive input in the $_[ARG0] in a form of a hashref. The possible keys/value of that hashref are as follows:

page

{ page => 'google.ca' }

The page key will contain the same thing you specified for page argument in grab() event/method.

raw

{ raw => 1 }

The raw key will contain the same thing you specified for raw argument in grab() event/method. If you didn't specify anything - it won't be present in the output.

error

{ error => 'Network error: timeout' }

If an error occurred then the error key will be present describing the reason for failure.

Depending on the setting of raw argument the result key will either contain a hashref filled with info or the actual doctype. See description of grab() method in WWW::DoctypeGrabber's documentation for explanation of all the keys/values in the hashref.

user defined

{ '_blah' => 'foos' }

Any arguments beginning with _ (underscore) passed into the grab() event/method will be present intact in the result.