| Devel::PerlySense::Document::Api - The methods of a package |
new()rsSortSub($fileCurrent)mergeWithBase($oApiBase)isSubSupported($nameSub)percentSupportedOf($raNameSub)percentConsistsOf($raNameSub)
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.
new()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.
rsSortSub($fileCurrent)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.
Return 1 or die on errors.
Set the $self->rhSub->{$nameSub} to a new Document::Location with $oDocument and possibly a row/col for $oNode. Set the rhProperty for:
sub
If no $oNode is passed, the location is supposed to be unknown, with row/col: 0/0.
Return the new oLocation. Die on errors.
mergeWithBase($oApiBase)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.
isSubSupported($nameSub)Return true if $nameSub is supported by this API, else false.
percentSupportedOf($raNameSub)Return percent (0..100) of how many of the sub names in raNameSub that are present in the api.
percentConsistsOf($raNameSub)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 Lindström, <johanl[ÄT]DarSerMan.com>
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.
I will be notified, and then you'll automatically be notified of progress on
your bug as I make changes.
Copyright 2005 Johan Lindström, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Devel::PerlySense::Document::Api - The methods of a package |