1Devel::InnerPackage(3)User Contributed Perl DocumentationDevel::InnerPackage(3)
2
3
4
6 Devel::InnerPackage - find all the inner packages of a package
7
9 use Foo::Bar;
10 use Devel::innerPackage qw(list_packages);
11
12 my @inner_packages = list_packages('Foo::Bar');
13
15 Given a file like this
16
17 package Foo::Bar;
18
19 sub foo {}
20
21 package Foo::Bar::Quux;
22
23 sub quux {}
24
25 package Foo::Bar::Quirka;
26
27 sub quirka {}
28
29 1;
30
31 then
32
33 list_packages('Foo::Bar');
34
35 will return
36
37 Foo::Bar::Quux
38 Foo::Bar::Quirka
39
41 list_packages <package name>
42
43 Return a list of all inner packages of that package.
44
46 Simon Wistow <simon@thegestalt.org>
47
49 Copyright, 2005 Simon Wistow
50
51 Distributed under the same terms as Perl itself.
52
54 None known.
55
56
57
58perl v5.8.8 2007-04-17 Devel::InnerPackage(3)