debian man page for method::autoload

Query: method::autoload

OS: debian

Section: 3pm

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

Method::Autoload(3pm)					User Contributed Perl Documentation				     Method::Autoload(3pm)

NAME
Method::Autoload - Autoloads methods from a list of packages into the current package
SYNOPSIS
package MyPackage; use base qw{Method::Autoload}
DESCRIPTION
The Method::Autoload base class package is used to autoload methods from a list of packages where you may not know what methods are available until run time. A good use of this package is programming support for user contributed packages or user contributed plugins.
USAGE
use MyPackage; my $object=MyPackage->new(%hash); #provides new and initialize methods $object->pushPackages("My::Bar"); #appends to "packages" array $object->unshiftPackages("My::Foo"); #prepends to "packages" array use MyPackage; my $object=MyPackage->new(packages=>["My::Foo", "My::Bar"]); $object->foo; #from My::Foo $object->bar; #from My::Bar
CONSTRUCTOR
new my $object=MyPackage->new(%hash); my $object=MyPackage->new(package=>["My::Package1", "My::Package2"]); initialize
METHODS PUBLIC
packages Returns the current list of packages in the "packages" array. my @package=$object->packages; #() my $package=$object->packages; #[] pushPackages Pushes packages on to the "packages" array. $object->pushPackages("My::Bar"); $object->pushPackages(@packages); unshiftPackages Unshifts packages on to the "packages" array. Use this if you want to override a "default" package. Please use with care. $object->unshiftPackages("My::Foo"); $object->unshiftPackages(@packages); autoloaded Returns a hash of autoloaded methods and the classes that they came from. my %hash=$object->autoloaded; #() my $hash=$object->autoloaded; #{}
METHODS PRIVATE
DESTROY ("Global" method) We define DESTROY in this package so that it does not call AUTOLOAD but you may overload this method in your package, if you need it. AUTOLOAD ("Global" method) AUTOLOAD is a "global" method. Please review the limitations on inheriting this method. autoload my $subref=$object->autoload($class, $method);
BUGS
DavisNetworks.com provides support services for all Perl applications including this package.
SUPPORT
AUTHOR
Michael R. Davis CPAN ID: MRDVT STOP, LLC domain=>michaelrdavis,tld=>com,account=>perl http://www.stopllc.com/
COPYRIGHT
This program is free software licensed under the... The BSD License The full text of the license can be found in the LICENSE file included with this module.
SEE ALSO
Class::Std AUTOMETHOD method, perl v5.12.3 2010-01-21 Method::Autoload(3pm)
Related Man Pages
universal(3pm) - redhat
class::mop::method(3) - osx
class::makemethods::autoload(3pm) - debian
method::autoload(3pm) - debian
ppi::statement::package(3pm) - debian
Similar Topics in the Unix Linux Community
getting data list into a hash array
why /home and /packages are network based?
license of software package
Perl + object-oriented programming help
HPux 11.23: packages?