++ed by:

32 PAUSE users
14 non-PAUSE users.

Anthony Brummett


Devel::hdb::App::PackageInfo - Get information about packages and subroutines


GET /packageinfo/<package>

Get information about the named package, or 'main::' if no package is given.

Returns 200 and a JSON in the body: { name: String - package name packages: [ // list of packages under this package { name: String - package name href: URL (/packageinfo/<That::package::name>) }, ... ], subroutines: [ // List of subroutine names in this package { name: String - subroutine name including package href: URL (/subinfo/<That::package::subname>) }, ... ], }

Returns 400 if the named package is not a valid package name Returns 404 if the named package is not present

GET /subinfo/<subname>

Get information about the named subroutine. If the subname has no package included, package main:: is assummed.

Returns 200 and a JSON-encoded hash in the body with these keys:

subroutine: String - subroutine name, not including package package => Package the subroutine is in filename => File the sub was defined line => What line the sub is defined end => Last line where the sub is defined source => If the sub was created in an eval, this is the file the eval happened in source_line => Line the eval happened in

Returns 404 if the given subroutine was not found.

source and source_line can differ from file and start in the case of subroutines defined inside of a string eval. In this case, "file" will be a string like (eval 23)[/some/file/path/module.pm:123] representing the text that was eval-ed, and "start" will be the line within that text where the subroutine was defined. "source" would be /some/file/path/module.pm showing where in the original source code the text came from, and "source_line" would be 123, the line in the original source file.




Anthony Brummett <brummett@cpan.org>


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