The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Devel::hdb::App::Action - Get and set line actions

DESCRIPTION

Line actions are perl code snippets run just before executable statements in the debugged program. The return value is ignored. These code snippets are run in the context of the debugged program, and can change the program's state, including lexical variables.

Routes

GET /actions

Get action information about a particular file and line number. Accepts these parameters as filters to limit the returned breakpoint data: filename File name line Line number code Perl code string inactive True if the breakpoint is inactive

Returns 200 and a JSON-encoded array containing hashes with these keys: filename => File name lineno => Line number code => Code to execute for this action inactive => 1 (yes) or undef (no), whether this action is disabled/inactive href => URL string to uniquely identify this action

POST /actions

Create an action. Action details must appear in the body as JSON hash with these keys: filename File name line Line number code Action code to run before this line executes. inactive Set to true to make the action inactive, false to clear the setting.

It responds 200 with the same JSON-encoded hash as GET /actions. Returns 403 if the line is not breakable. Returns 404 if the filename is not loaded.

GET /actions/<id>

Return the same JSON-encoded hash as GET /breakpoints. Returns 404 if there is no breakpoint with that id.

POST /actions/<id>

Change an action property. The body contains a JSON hash of which keys to change, along with their new values. Returns 200 and the same JSON hash as GET /actions, including the new values.

Returns 403 if the given property cannot be changed. Returns 404 if there is no action with that id.

DELETE /actions/<id>

Delete the action with the given id. Returns 204 if successful. Returns 404 if there is no action with that id.

SEE ALSO

Devel::hdb

AUTHOR

Anthony Brummett <brummett@cpan.org>

COPYRIGHT

Copyright 2018, Anthony Brummett. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.