Class::Inspector::Functions - Get information about a class and its structure
| Use Case | Command | Description |
|---|---|---|
| π§ͺ Installed | installed( 'Foo::Class' ) | Check if a class is installed |
| π Loaded | loaded( 'Foo::Class' ) | Check if a class is loaded |
| π Filename | filename( 'Foo::Class' ) | Get the filename of the class |
| π Resolved filename | resolved_filename( 'Foo::Class' ) | Get the resolved filename (with @INC) |
| π Functions | functions( 'Foo::Class' ) | Get list of function names |
| π Function refs | function_refs( 'Foo::Class' ) | Get references to functions |
| β Function exists | function_exists( 'Foo::Class', 'bar' ) | Check if a function exists |
| π¬ Methods | methods( 'Foo::Class', 'full', 'public' ) | Get methods (with options) |
| π½ Subclasses | subclasses( 'Foo::Class' ) | Find all loaded subclasses |
version 1.36
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' );
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.
The following functions are exported by default:
installedloadedfilenamefunctionsmethodssubclassesThe following functions are exported only by request:
resolved_filenameloaded_filenamefunction_refsfunction_existsAll the functions may be imported using the :ALL tag.
<http://ali.as/>, Class::Handle, Class::Inspector
Original author: Adam Kennedy <adamk AT cpan.org>
Current maintainer: Graham Ollis <plicease AT cpan.org>
Contributors:
This software is copyright (c) 2002-2019 by Adam Kennedy.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Generated by phpman v4.9.26-1-g511901d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-08-08 16:37 @216.73.216.150
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format