Devel::InnerPackage(3) User Contributed Perl Documentation Devel::InnerPackage(3)

# [NAME](#NAME)

Devel::InnerPackage - find all the inner packages of a package

# [SYNOPSIS](#SYNOPSIS)

```
    use Foo::Bar;
    use Devel::InnerPackage qw(list_packages);
    my @inner_packages = list_packages('Foo::Bar');
```

# [DESCRIPTION](#DESCRIPTION)

Given a file like this

```
    package Foo::Bar;
    sub foo {}
    package Foo::Bar::Quux;
    sub quux {}
    package Foo::Bar::Quirka;
    sub quirka {}
    1;
```

then

```
    list_packages('Foo::Bar');
```

will return

```
    Foo::Bar::Quux
    Foo::Bar::Quirka
```

# [METHODS](#METHODS)

## [list\_packages &lt;package name&gt;](#list_packages__package_name_)

Return a list of all inner packages of that package.

# [AUTHOR](#AUTHOR)

Simon Wistow &lt;simon@thegestalt.org&gt;

# [COPYING](#COPYING)

Copyright, 2005 Simon Wistow

Distributed under the same terms as Perl itself.

# [BUGS](#BUGS)

None known.

2026-07-28 perl v5.44.0

---

Document: Devel::InnerPackage(3pm) from perl-module-pluggable 6.4-r0 (Chainguard OS)
Source: https://github.com/simonwistow/Module-Pluggable
