-
-
30 Aug 2019 08:12:04 UTC
- Distribution: Devel-PerlySense
- Module version: 0.0221
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (5)
- Testers (86 / 100 / 0)
- Kwalitee
Bus factor: 1- % Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (433.75KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- App::Ack
- Cache::Cache
- Cache::FileCache
- Carp
- Cwd
- Data::Dumper
- Digest::SHA
- Exporter
- File::Basename
- File::Find
- File::Find::Rule
- File::Path
- File::Slurp
- File::Spec::Functions
- File::chdir
- Getopt::Long
- Graph::Easy
- HTTP::Date
- IO::String
- List::AllUtils
- List::MoreUtils
- List::Util
- Module::Pluggable
- Module::Runtime
- Moo
- POSIX
- PPI
- PPI::Document
- PPI::Dumper
- Params::Util
- Path::Class
- Path::Tiny
- Perl::Critic
- Perl::Tidy
- Pod::Text
- Pod::Usage
- Spiffy
- Storable
- Sub::Exporter
- Text::Table
- Time::HiRes
- Tree::Parser
- YAML::Tiny
- base
- lib
- strict
- utf8
- warnings
- Reverse dependencies
- CPAN Testers List
- Dependency graph
- NAME
- DESCRIPTION
- PROPERTIES
- API METHODS
- new()
- aNameSubVisible(oPerlySense => $oPs, fileCurrent => $file)
- isSubVisible($oPerlySense, $fileCurrent, $nameSub)
- rsSortSub($fileCurrent)
- parsePackageSetSub(raNodeSub => $raNodeSub, source => $source, oDocument => $oDocument)
- parseSourceSetSub(source => $source, oDocument => $oDocument)
- oLocationSetSub(nameSub => $nameSub, oDocument => $oDocument, [oNode => $oNode])
- mergeWithBase($oApiBase)
- isSubSupported($nameSub)
- percentSupportedOf($raNameSub)
- percentConsistsOf($raNameSub)
- AUTHOR
- BUGS
- ACKNOWLEDGEMENTS
- COPYRIGHT & LICENSE
NAME
Devel::PerlySense::Document::Api - The methods (and their locations) of a package
DESCRIPTION
An API is the methods/subs a module/package supports (or in some cases _may_ support).
PROPERTIES
rhSub
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.API METHODS
new()
Create new Api object.
aNameSubVisible(oPerlySense => $oPs, fileCurrent => $file)
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.
isSubVisible($oPerlySense, $fileCurrent, $nameSub)
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.
parsePackageSetSub(raNodeSub => $raNodeSub, source => $source, oDocument => $oDocument)
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.
parseSourceSetSub(source => $source, oDocument => $oDocument)
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.
oLocationSetSub(nameSub => $nameSub, oDocument => $oDocument, [oNode => $oNode])
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.
AUTHOR
Johan Lindstrom,
<johanl@cpan.org>
BUGS
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.ACKNOWLEDGEMENTS
COPYRIGHT & LICENSE
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.
Module Install Instructions
To install Devel::PerlySense, copy and paste the appropriate command in to your terminal.
cpanm Devel::PerlySense
perl -MCPAN -e shell install Devel::PerlySense
For more information on module installation, please visit the detailed CPAN module installation guide.