The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Class::Superclasses - Find all superclasses of a class

DESCRIPTION

Class::Superclasses uses PPI to get the superclasses of a class;

SYNOPSIS

  use Class::Superclasses;
  
  my $class_file = '/path/to/class_file.pm';
  my $parser = Class::Superclasses->new();
  $parser->document($class_file);
  my @superclasses = $parser->superclasses();
  
  print $_,"\n" for(@superclasses);

METHODS

new

creates a new object of Class::Superclasses.

  my $parser = Class::Superclasses->new();
  # or
  my $parser = Class::Superclasses->new($filename);

superclasses

returns in list context an array of all superclasses of the Perl class, in scalar context it returns an arrayref.

  my $arrayref = $parser->superclasses();
  my @array = $parser->superclasses();

document

tells Class::Superclasses which Perl class should be analyzed.

  $parser->document($filename);

PREREQUESITS

  PPI

SEE ALSO

PPI, Class::Inheritance

LICENSE

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

copyright 2006 - 2007 Renee Baecker <module@renee-baecker.de>