GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  CLASS::MIXINFACTORY::HASAFACTORY (3)

.ds Aq ’

NAME

Class::MixinFactory::HasAFactory - Delegates to a Factory

CONTENTS

SYNOPSIS



  package My::BaseClass;
  @ISA = Class::MixinFactory::HasAFactory;
  sub new { ... }
  sub foo { return "Foo Bar" }

  package My::Logging;
  sub foo { warn "Calling foo"; (shift)->NEXT(foo, @_) }

  package My::UpperCase;
  sub foo { uc( (shift)->NEXT(foo, @_) ) }

  package main;
  use My::BaseClass;
  print My::BaseClass->class()->new()->foo();
  print My::BaseClass->class( Logging )->new()->foo();
  print My::BaseClass->class( UpperCase )->new()->foo();
  print My::BaseClass->class( Logging, UpperCase )->new()->foo();



DESCRIPTION

A class for use by classes which want a factory method.

Inherit from this class to obtain the class() factory method, described below.

PUBLIC METHODS

mixin_factory()


  BaseClass->mixin_factory() : $factory_object



Gets the associated mixin factory. Generated the first time it is needed.

class()


  BaseClass->class( @mixins ) : $package_name



Calls the class() method on the associated mixin factory.

SEE ALSO

For a facade interface that facilitates access to this functionality, see Class::MixinFactory.

For distribution, installation, support, copyright and license information, see Class::MixinFactory::ReadMe.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 MIXINFACTORY::HASAFACTORY (3) 2004-11-16

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.