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


Manual Reference Pages  -  MODULE::FUNCTIONS (3)

.ds Aq ’

NAME

Module::Functions - Get function list from package.

CONTENTS

SYNOPSIS



    package My::Class;
    use parent qw/Exporter/;
    use Module::Functions;
    our @EXPORT = get_public_functions();



DESCRIPTION

Module::Functions is a library to get a public functions list from package. It is useful to create a exportable function list.

METHODS

my CW@functions = get_public_functions()

my CW@functions = get_public_functions($package)

Get a public function list from the package.

If you don’t pass the $package parameter, the function use caller(0) as a source package.

This function does not get a function, that imported from other package.

For example:



    package Foo;
    use File::Spec::Functions qw/catfile/;
    sub foo { }



In this case, return value of get_public_functions(Foo) does not contain ’catfile’. Return value is (foo).

RULES

This get_public_functions removes some function names.

Rules are here:
BEGIN, UNITCHECK, CHECK, INIT, and END are hidden.
’import’ method is hidden
function name prefixed by ’_’ is hidden.

my CW@functions = get_full_functions();

my CW@functions = get_full_functions($package)

This function get ALL functions. ALL means functions that were imported from other packages. And included specially named functions(BEGIN , UNITCHECK , CHECK , INIT and END). Of course, included also private functions( ex. _foo ).

AUTHOR

Tokuhiro Matsuno <tokuhirom AAJKLFJEF@ GMAIL COM>

SEE ALSO

Exporter::Auto have same feature of this module, but it stands on very tricky thing.

Class::Inspector finds the function list. But it does not check the function defined at here or imported from other package.

LICENSE

Copyright (C) Tokuhiro Matsuno

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

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


perl v5.20.3 MODULE::FUNCTIONS (3) 2016-03-17

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