Devel::PerlySense::Document::Api - The methods (and their locations) of a package
An API is the methods/subs a module/package supports (or in some cases _may_ support).
Hash ref with (keys: method/sub name; values: Document::Location objects).
Default: {}
The Location objects have a sub property which is the name of the sub.
sub
Create new Api object.
Return array with the method/sub names in the interface that are visible.
A method is invisible if it's a private method in a base class of $fileCurrent, outside the current Project, according to $oPerlySense.
Return true if the Sub name is visibl, else false.
A sub/method is invisible if it's a private method in a base class of $fileCurrent, outside the current Project, according to $oPerlySense.
Return sub ref for sorting sub names of this Api, using the rhSub property and given the $fileCurrent.
Parse the entire package data, both $source and found method nodes. Add both found subs and $raNodeSub to the rhSub property.
Return 1 or die on errors.
Parse the $source, looking for $self->method calls, and $self->{hash_key}, and add them to the rhSub property.
Set the $self->rhSub->{$nameSub} to a new Document::Location with $oDocument and possibly a row/col for $oNode. Set the rhProperty for:
If no $oNode is passed, the location is supposed to be unknown, with row/col: 0/0.
Return the new oLocation. Die on errors.
Adjust this object by adding appropriate parts of $oApiBase, i.e. the methods in $oApiBase->rhSub that aren't overridden in this class.
If a method has no row/col in neither base or self, it's supposed to be defined in the base class. Any method definition with row/col in self overrides one in base.
Return 1 on success. Die on errors.
Return true if $nameSub is supported by this API, else false.
Return percent (0..100) of how many of the sub names in raNameSub that are present in the api.
Return percent (0..100) of how much of the api consists of the sub names in raNameSub.
I.e. a large API will have a low percentage. Extra sub names in $raNameSub will not affect the percentage.
Johan Lindstrom, <johanl@cpan.org>
<johanl@cpan.org>
Please report any bugs or feature requests to bug-devel-perlysense@rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Devel-PerlySense. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-devel-perlysense@rt.cpan.org
Copyright 2005 Johan Lindstrom, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Devel::PerlySense, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Devel::PerlySense
CPAN shell
perl -MCPAN -e shell install Devel::PerlySense
For more information on module installation, please visit the detailed CPAN module installation guide.