NAME

Class::MOP::Package - Package Meta Object

SYNOPSIS

DESCRIPTION

METHODS

meta
initialize ($package_name)
name

This is a read-only attribute which returns the package name for the given instance.

namespace

This returns a HASH reference to the symbol table. The keys of the HASH are the symbol names, and the values are typeglob references.

add_package_symbol ($variable_name, ?$initial_value)

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.

get_package_symbol ($variable_name)

This will return a reference to the package variable in $variable_name.

has_package_symbol ($variable_name)

Returns true (1) if there is a package variable defined for $variable_name, and false (0) otherwise.

remove_package_symbol ($variable_name)

This will attempt to remove the package variable at $variable_name.

remove_package_glob ($glob_name)

This will attempt to remove the entire typeglob associated with $glob_name from the package.

list_all_package_symbols (?$type_filter)

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).

AUTHORS

Stevan Little <stevan@iinteractive.com>

COPYRIGHT AND LICENSE

Copyright 2006, 2007 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.