File::PackageIndexer

Indexing of packages and subs
Download

File::PackageIndexer Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Steffen Muller
  • Publisher web site:
  • http://search.cpan.org/~smueller/

File::PackageIndexer Tags


File::PackageIndexer Description

Indexing of packages and subs File::PackageIndexer is a Perl module that parses a piece of Perl code using PPI and tries to find all subs and their packages as well as the inheritance of the packages.Currently, the following constructs are recognized:package statementsplain subroutine declarationsClass::Accessor-like accessor generationClass::XSAccessor and Class::XSAccessor::Arrayuse base ... inheritance declarationuse parent ... inheritance declarationour @ISA = ... and @ISA = ... inheritance declarationpush @ISA, ... and unshift @ISA, ... inheritance modificationThe inheritance detection (hopefully) correctly recognizes the effect of special blocks such as BEGIN {...}. END blocks are ignored.SYNOPSIS use File::PackageIndexer; my $indexer = File::PackageIndexer->new(); $indexer->clean(1); my $pkgs = $indexer->parse( $ppi_document_or_code_string ); use Data::Dumper; print Dumper $pkgs; # prints something like: # { # Some::Package => { # name => 'Some::Package', # subs => { # new => 1, # foo => 1, # }, # isa => , # }, # ... other pkgs ... # } Requirements: · Perl


File::PackageIndexer Related Software