GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Package::MoreUtil(3) User Contributed Perl Documentation Package::MoreUtil(3)

Package::MoreUtil - Package-related utilities

This document describes version 0.592 of Package::MoreUtil (from Perl distribution Package-MoreUtil), released on 2019-12-25.

 use Package::MoreUtil qw(
     package_exists
     list_package_contents
     list_package_subs
     list_subpackages
 );

 print "Package Foo::Bar exists" if package_exists("Foo::Bar");
 my %content   = list_package_contents("Foo::Bar");
 my @subnames  = list_package_subs("Foo::Bar");
 my @subpkg    = list_subpackages("Foo::Bar");
 my @allsubpkg = list_subpackages("Foo::Bar", 1); # recursive

DEPRECATION NOTICE: This module is deprecated in favor of Package::Stash and Package::Util::Lite.

Return true if package "exists". By "exists", it means that the package has been defined by "package" statement or some entries have been created in the symbol table (e.g. "$Foo::var = 1;" will make the "Foo" package "exist").

This function can be used e.g. for checking before aliasing one package to another. Or to casually check whether a module has been loaded.

Return a hash containing package contents. For example:

 (
     sub1  => \&Foo::Bar::sub1,
     sub2  => \&Foo::Bar::sub2,
     '%h1' => \%Foo::Bar::h1,
     '@a1' => \@Foo::Bar::a1,
     ...
 )

This module won't list subpackages. Use list_subpackages() for that.

Return a list containing subroutine names in package $pkg.

List subpackages, e.g.:

 (
     "Foo::Bar::Baz",
     "Foo::Bar::Qux",
     ...
 )

If $recursive is true, will also list subpackages of subpackages, and so on.

You can recurse from the top, e.g.:

 list_subpackages("", 1);

Please visit the project's homepage at <https://metacpan.org/release/Package-MoreUtil>.

Source repository is at <https://github.com/perlancar/perl-Package-MoreUtil>.

Please report any bugs or feature requests on the bugtracker website <https://rt.cpan.org/Public/Dist/Display.html?Name=Package-MoreUtil>

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

Package::Stash

Package::Util::Lite

perlmod

Package::Util (currently empty/placeholder at the time of this writing)

perlancar <perlancar@cpan.org>

This software is copyright (c) 2019, 2018, 2014, 2013 by perlancar@cpan.org.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

2019-12-25 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.