Devel::hdb::App::Response - Manage responses from the debugger to the user interface
my $queued = Devel::hdb::Response->queue('program_name'); $queued->data('test.pl'); my $resp = Devel::hdb::Response->new('ping'); $io->print $resp->encode();
This class is used to create and enqueue messages to send to the user interface.
Creates a new message with the given 'type' field. $env is an optional PSGI environment hash. If given, and the environment has a parameter 'rid', then its value is copied to the Response instance.
Creates a new message jsut as new() does. The newly created message is added to the list of queued messages to be included in some future call to encode.
Mutator for getting or setting the 'data' field of the message. Accepts only a single scalar, which may be a reference to a more complicated tyoe.
Returns a JSON-encoded string representing the message. If there are any queued messages, the response is an array of all the messages, with the invocant first in the array. After the call to encode(), the queued list is emptied.
Devel::hdb, JSON
Anthony Brummett <brummett@cpan.org>
Copyright 2013, Anthony Brummett. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
'=item' outside of any '=over'
To install Devel::hdb, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Devel::hdb
CPAN shell
perl -MCPAN -e shell install Devel::hdb
For more information on module installation, please visit the detailed CPAN module installation guide.