Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

class::trait::base(3pm) [debian man page]

Class::Trait::Base(3pm) 				User Contributed Perl Documentation				   Class::Trait::Base(3pm)

NAME
Class::Trait::Base - Base class for all Traits SYNOPSIS
This class needs to be inherited by all traits so they can be identified as traits. use Class::Trait 'base'; DESCRIPTION
Not much going on here, just an AUTOLOAD method to help properly dispatch calls to "SUPER::" and an "apply" method. ############################################################################## apply require TSomeTrait; TSomeTrait->apply($object); This method allows you to apply a trait to an object. It returns the trait so you can then reapply it: TTricks->apply($dog_object) ->apply($cat_object); This is merely syntactic sugar for the "Class::Trait::apply" method: Class::Trait->apply($dog_object, 'TTricks'); Class::Trait->apply($cat_object, 'TTricks'); SEE ALSO
Class::Trait, Class::Trait::Config MAINTAINER
Curtis "Ovid" Poe, "<ovid [at] cpan [dot] org>" AUTHOR
Stevan Little <stevan@iinteractive.com> COPYRIGHT AND LICENSE
Copyright 2004, 2005 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. perl v5.10.0 2010-04-25 Class::Trait::Base(3pm)

Check Out this Related Man Page

Class::Trait::Config(3pm)				User Contributed Perl Documentation				 Class::Trait::Config(3pm)

NAME
Class::Trait::Config - Trait configuration information storage package. SYNOPSIS
This package is used internally by Class::Trait to store Trait configuration information. It is also used by Class::Trait::Reflection to gather information about a Trait. DESCRIPTION
This class is a intentionally very C-struct-like. It is meant to help encapsulate the Trait configuration information in a clean easy to access way. This class is effectively sealed. It is not meant to be extended, only to be used. METHODS
new Creates a new empty Class::Trait::Config object, with fields initialized to empty containers. name An accessor to the "name" string field of the Class::Trait::Config object. sub_traits An accessor to the "sub_traits" array reference field of the Class::Trait::Config object. requirements An accessor to the "requirements" hash reference field of the Class::Trait::Config object. Note, the requirements field is a hash reference to speed requirement lookup, the values of the hash are simply booleans. methods An accessor to the "methods" hash reference field of the Class::Trait::Config object. overloads An accessor to the "overloads" hash reference field of the Class::Trait::Config object. conflicts An accessor to the "conflicts" hash reference field of the Class::Trait::Config object. Note, the conflicts field is a hash reference to speed conflict lookup, the values of the hash are simply booleans. clone Provides deep copy functionality for the Class::Trait::Config object. This will be sure to copy all sub-elements of the object, but not to attempt to copy and subroutine references found. SEE ALSO
Class::Trait, Class::Trait::Reflection AUTHOR
Stevan Little <stevan@iinteractive.com> COPYRIGHT AND LICENSE
Copyright 2004, 2005 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. perl v5.10.0 2010-04-25 Class::Trait::Config(3pm)
Man Page