Rechercher une page de manuel
Class::MOP::Package.3pm
Langue: en
Version: 2008-02-08 (mandriva - 01/05/08)
Section: 3 (Bibliothèques de fonctions)
NAME
Class::MOP::Package - Package Meta ObjectDESCRIPTION
This is an abstraction of a Perl 5 package, it is a superclass of Class::MOP::Class and provides all of the symbol table introspection methods.METHODS
- meta
- Returns a metaclass for this package.
- initialize ($package_name)
- This will initialize a Class::MOP::Package instance which represents the package of $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-2008 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.
Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre