Devel-hdb
view release on metacpan or search on metacpan
docs/rest-api.txt view on Meta::CPAN
POST /eval
Request the debugger evaluate some Perl code in the debugged program's most
recent stack frame. The request body contains JSON:
{
wantarray: 0, 1 or undefined - scalar, list or void context
code: String - The string to eval
}
Returns 200 if successful and the result in the body. The body contents
should be decoded using Data::Transform::ExplicitMetadata
Returns 409 if there was an exception. The body contents should be decoded
using Data::Transform::ExplicitMetadata
-------------------------------------------------------------------------
GET /getvar/<level>
Get a list of all the lexical variables at the specified stack level.
Returns 200 and JSON in the body
[
lib/Devel/hdb/App/Eval.pm view on Meta::CPAN
Evaluate a string of Perl code in the context of the debugged process.
The code is evaluated in the content of the nearest stack frame that
is not part of the debugger. The request body must contain a JSON-encoded
hash with these keys:
code => String of Perl code to evaluate
wantarray => 0, 1 or undef; whether to evaluate the code in scalar list
or void context
Returns 200 if successful and the result in the body. The body contents
should be decoded using Data::Transform::ExplicitMetadata
Returns 409 if there was an exception. The body contents should be decoded
using Data::Transform::ExplicitMetadata
=item GET /getvar/<level>
Get a list of all the lexical variables at the given stack level.
Return a JSON-encoded array containing hashes with these keys:
name => Name of the variable, including the sigil
href => URL to use to get the value of the variable
lib/Devel/hdb/App/Eval.pm view on Meta::CPAN
$scalar A simple scalar value
@array The entire array
$array[1] One element of the array
$hash{key1} One element of the hash
@array[1,2] Array slice
@hash{key1,key2} Hash slice
@array[1 .. 2] Array slice with a range
Returns 200 and JSON in the body. The returned JSON is an
encoded version of whatever the Perl code evaluated to, and should
be decoded with Data::Transform::ExplicitMetadata.
=back
=head1 SEE ALSO
L<Devel::hdb>, L<Padwalker>
=head1 AUTHOR
Anthony Brummett <brummett@cpan.org>
( run in 0.335 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )