Add built local::lib
[catagits/Gitalist.git] / local-lib5 / lib / perl5 / Class / Inspector / Functions.pm
1 package Class::Inspector::Functions;
2
3 use 5.006;
4 use strict;
5 use warnings;
6 use Exporter         ();
7 use Class::Inspector ();
8
9 use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION);
10 BEGIN {
11         $VERSION = '1.24';
12         @ISA     = 'Exporter';
13
14
15         @EXPORT = qw(
16                 installed
17                 loaded
18
19                 filename
20                 functions
21                 methods
22
23                 subclasses
24         );
25
26         @EXPORT_OK = qw(
27                 resolved_filename
28                 loaded_filename
29
30                 function_refs
31                 function_exists
32         );
33                 #children
34                 #recursive_children
35
36         %EXPORT_TAGS = ( ALL => [ @EXPORT_OK, @EXPORT ] );
37
38         foreach my $meth (@EXPORT, @EXPORT_OK) {
39             my $sub = Class::Inspector->can($meth);
40             no strict 'refs';
41             *{$meth} = sub {&$sub('Class::Inspector', @_)};
42         }
43
44 }
45
46 1;
47
48 __END__
49
50 =pod
51
52 =head1 NAME
53
54 Class::Inspector::Functions - Get information about a class and its structure
55
56 =head1 SYNOPSIS
57
58   use Class::Inspector::Functions;
59   # Class::Inspector provides a non-polluting,
60   # method based interface!
61   
62   # Is a class installed and/or loaded
63   installed( 'Foo::Class' );
64   loaded( 'Foo::Class' );
65   
66   # Filename related information
67   filename( 'Foo::Class' );
68   resolved_filename( 'Foo::Class' );
69   
70   # Get subroutine related information
71   functions( 'Foo::Class' );
72   function_refs( 'Foo::Class' );
73   function_exists( 'Foo::Class', 'bar' );
74   methods( 'Foo::Class', 'full', 'public' );
75   
76   # Find all loaded subclasses or something
77   subclasses( 'Foo::Class' );
78
79 =head1 DESCRIPTION
80
81 Class::Inspector::Functions is a function based interface of
82 L<Class::Inspector>. For a thorough documentation of the available
83 functions, please check the manual for the main module.
84
85 =head2 Exports
86
87 The following functions are exported by default.
88
89   installed
90   loaded
91   filename
92   functions
93   methods
94   subclasses
95
96 The following functions are exported only by request.
97
98   resolved_filename
99   loaded_filename
100   function_refs
101   function_exists
102
103 All the functions may be imported using the C<:ALL> tag.
104
105 =head1 SUPPORT
106
107 Bugs should be reported via the CPAN bug tracker
108
109 L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Class-Inspector>
110
111 For other issues, or commercial enhancement or support, contact the author.
112
113 =head1 AUTHOR
114
115 Adam Kennedy E<lt>adamk@cpan.orgE<gt>
116
117 Steffen Mueller E<lt>smueller@cpan.orgE<gt>
118
119 =head1 SEE ALSO
120
121 L<http://ali.as/>, L<Class::Handle>
122
123 =head1 COPYRIGHT
124
125 Copyright 2002 - 2009 Adam Kennedy.
126
127 Class::Inspector::Functions copyright 2008 - 2009 Steffen Mueller.
128
129 This program is free software; you can redistribute
130 it and/or modify it under the same terms as Perl itself.
131
132 The full text of the license can be found in the
133 LICENSE file included with this module.
134
135 =cut