MixinFactory::NEXT(3pm) User Contributed Perl Documentation MixinFactory::NEXT(3pm)NAME
Class::MixinFactory::NEXT - Superclass method redispatch for mixins
SYNOPSIS
use Class::MixinFactory::NEXT;
package My::BaseClass;
sub foo { return "Foo Bar" }
package My::Logging;
sub foo { warn "Calling foo"; (shift)->NEXT('foo', @_) }
package My::MixedClass;
@ISA = ( 'My::Logging', 'My::BaseClass', 'Class::MixinFactory::NEXT'; );
package main;
print My::MixedClass->foo();
DESCRIPTION
Enhanced superclass method dispatch for use inside mixin class methods. Allows mixin classes to redispatch to other classes in the
inheritance tree without themselves inheriting from anything.
Public Methods
This package defines one method, named NEXT.
$callee->NEXT( $method, @args );
Searches the inheritance tree of the callee until it finds the package from which NEXT is being called, and then continues searching until
the next class which can perform the named method.
Unlike SUPER, this method will backtrack down the inheritance tree to find implementations later in the search path even if they are on a
separate branch.
SEE ALSO
This class is automatically included by Class::MixinFactory.
This is similar to the functionality provided by NEXT::ACTUAL, but without using AUTOLOAD; for a more generalized approach to this issue
see NEXT.
For distribution, installation, support, copyright and license information, see Class::MixinFactory::ReadMe.
perl v5.10.1 2009-12-10 MixinFactory::NEXT(3pm)
Check Out this Related Man Page
MixinFactory::InsideOutAttr(3pm) User Contributed Perl Documentation MixinFactory::InsideOutAttr(3pm)NAME
Class::MixinFactory::InsideOutAttr - Method maker for inside out data
SYNOPSIS
package My::Class;
use Class::MixinFactory::InsideOutAttr qw( foo bar baz );
sub new { ... }
package main;
My::Class->foo( 'Foozle' );
print My::Class->foo();
my $object = My::Class->new();
$object->foo( 'Bolix' );
print $object->foo();
DESCRIPTION
A simple method maker with opaque data storage.
Usage
To generate accessor methods for your class, use this package and pass the desired method names to the use or import statement.
Generates get/set accessor methods which can store values for a class or its instances. Each method stores the values associated with
various objects in an hash keyed by the object's stringified identity.
Destruction
A DESTROY method is installed to remove data for expired objects from the storage hash. (If the DESTROY method is not called, your program
will not release this data and memory will be wasted.)
If you implement your own DESTROY method, it should also call "Class::MixinFactory::InsideOutAttr::destroy($self)".
SEE ALSO
This class is used internally by Class::MixinFactory.
This is similar to the functionality provided by Class::MakeMethods::Template::InsideOut; for a more generalized approach to this issue see
Class::MakeMethods.
For distribution, installation, support, copyright and license information, see Class::MixinFactory::ReadMe.
perl v5.10.1 2009-12-10 MixinFactory::InsideOutAttr(3pm)
I want to search a file in fastest manner.
Presently I am using 'find' command. But it is taking around 15min for searching. Is there any other method through which I can do it fast? (3 Replies)
Is none of you using WLM? A search gives no matches....
Anyway, I have set up a class with inheritance = yes. In the rules characteristics I have chosen a shell script as an application. This script is caught by the class, but not the child processes, which have the PID of the script as the... (6 Replies)
Hi,
In multi-level inheritance:
class A {
public:
void fun() { cout << "A" << endl; }
};
class B : public A {
public:
void fun() { cout << "A" << endl; }
};
class C : public B { };
int main() {
C c;
c.fun(); // Ans: A
} (1 Reply)
Hello All,
I am a learner in C++. I was testing my inheritance knowledge with following piece of code.
#include <iostream>
using namespace std;
class base
{
public :
void display()
{
cout << "In base display()" << endl;
}
void display(int k)
{... (2 Replies)
there are about 300 objectivec .m files and I need to print each file name and its method and number of lines inside the method
there is a sample perl files that do perl brace matching... (0 Replies)