Class::MOP::Package - Package Meta Object
This is a read-only attribute which returns the package name for the given instance.
This returns a HASH reference to the symbol table. The keys of the HASH are the symbol names, and the values are typeglob references.
Given a $variable_name, which must contain a leading sigil, this method will create that variable within the package which houses the class. It also takes an optional $initial_value, which must be a reference of the same type as the sigil of the $variable_name implies.
$variable_name
$initial_value
This will return a reference to the package variable in $variable_name.
Returns true (1) if there is a package variable defined for $variable_name, and false (0) otherwise.
1
0
This will attempt to remove the package variable at $variable_name.
This will attempt to remove the entire typeglob associated with $glob_name from the package.
$glob_name
This will list all the glob names associated with the current package. By inspecting the globs returned you can discern all the variables in the package.
By passing a $type_filter, you can limit the list to only those which match the filter (either SCALAR, ARRAY, HASH or CODE).
$type_filter
Stevan Little <stevan@iinteractive.com>
Yuval Kogman <nothingmuch@woobling.com>
Copyright 2006 by Infinity Interactive, Inc.
http://www.iinteractive.com
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Class::MOP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Class::MOP
CPAN shell
perl -MCPAN -e shell install Class::MOP
For more information on module installation, please visit the detailed CPAN module installation guide.