Class::Component::Recipe::Collection - Component Collection
The actual list of classes. Provides get_classes and set_classes. Has to be an ArrayRef and is empty by default.
get_classes
set_classes
Contains the original content of the target classes @ISA arrays after it has been changed by install.
@ISA
Installs the list of classes and the $base_class in the $target_class. The $_between value is internal, so reinstall can pass the former @ISA contents.
$base_class
$target_class
$_between
Takes care that the passed class name is loaded.
Pushes a class at the end of the list.
If the $class is already present in the list, this is a no-op and will return 0. This can be changed by specifying a positive value for $force, which will remove the existing element before pushing. If the list has been changed, a 1 is returned.
$class
0
$force
1
Returns and removes the last element of the list.
Pushes a class at the beginning of the list.
If the class is already present, this will be a no-op and just return 0. If the $force value is set to a positive value, any existing value will be removed before the unshifting. If the list was changed, a 1 is returned.
Returns and removes the first element from the list.
Inserts $class in the list at $position.
$position
If the class already exists in the list, this is a no-op and will just return 0. If the <$force> value is set to a positive value any other mentioning of the class in the list will be removed first. If the list got changed a 1 is returned.
This removes the $class from the list. If $class is not even in the list, it returns 0, otherwise 1 if it really changed something.
This will replace $class in the list with $replacement. The call will croak if the $class is not even in the list.
$replacement
croak
Returns the position of the class in the list (zero based) or undef if it's not in there.
undef
This predicate returns true or false depending on the existance of $class in the list.
Robert 'phaylon' Sedlacek <phaylon@dunkelheit.at>
<phaylon@dunkelheit.at>
This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
To install Class::Component::Recipe, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Class::Component::Recipe
CPAN shell
perl -MCPAN -e shell install Class::Component::Recipe
For more information on module installation, please visit the detailed CPAN module installation guide.