Class::Inspector::Functions - Get information about a class and its structure


Class-Inspector documentation Contained in the Class-Inspector distribution.

Index


Code Index:

NAME

Top

Class::Inspector::Functions - Get information about a class and its structure

SYNOPSIS

Top

  use Class::Inspector::Functions;
  # Class::Inspector provides a non-polluting,
  # method based interface!

  # Is a class installed and/or loaded
  installed( 'Foo::Class' );
  loaded( 'Foo::Class' );

  # Filename related information
  filename( 'Foo::Class' );
  resolved_filename( 'Foo::Class' );

  # Get subroutine related information
  functions( 'Foo::Class' );
  function_refs( 'Foo::Class' );
  function_exists( 'Foo::Class', 'bar' );
  methods( 'Foo::Class', 'full', 'public' );

  # Find all loaded subclasses or something
  subclasses( 'Foo::Class' );

DESCRIPTION

Top

Class::Inspector::Functions is a function based interface of Class::Inspector. For a thorough documentation of the available functions, please check the manual for the main module.

Exports

The following functions are exported by default.

  installed
  loaded
  filename
  functions
  methods
  subclasses

The following functions are exported only by request.

  resolved_filename
  loaded_filename
  function_refs
  function_exists

All the functions may be imported using the :ALL tag.

SUPPORT

Top

Bugs should be reported via the CPAN bug tracker

http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Class-Inspector

For other issues, or commercial enhancement or support, contact the author.

AUTHOR

Top

Adam Kennedy <adamk@cpan.org>

Steffen Mueller <smueller@cpan.org>

SEE ALSO

Top

http://ali.as/, Class::Handle

COPYRIGHT

Top


Class-Inspector documentation Contained in the Class-Inspector distribution.

package Class::Inspector::Functions;

use 5.006;
use strict;
use warnings;
use Exporter         ();
use Class::Inspector ();

use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION);
BEGIN {
	$VERSION = '1.25';
	@ISA     = 'Exporter';


	@EXPORT = qw(
		installed
		loaded

		filename
		functions
		methods

		subclasses
	);

	@EXPORT_OK = qw(
		resolved_filename
		loaded_filename

		function_refs
		function_exists
	);
		#children
		#recursive_children

	%EXPORT_TAGS = ( ALL => [ @EXPORT_OK, @EXPORT ] );

	foreach my $meth (@EXPORT, @EXPORT_OK) {
	    my $sub = Class::Inspector->can($meth);
	    no strict 'refs';
	    *{$meth} = sub {&$sub('Class::Inspector', @_)};
	}

}

1;

__END__