Linux SoftwareProgrammingLibrariesClass::Container 0.12

Class::Container 0.12


Class::Container is a Perl module with Glues object frameworks together transparently. SYNOPSIS package Car; use Class::Cont
Developer:   Ken Williams
      more software by author →
Price:  0.00
License:   Perl Artistic License
File size:   18K
Language:   
OS:   
Rating:   0 /5 (0 votes)
Your vote:  
enlarge screenshot


Class::Container is a Perl module with Glues object frameworks together transparently.

SYNOPSIS

package Car;
use Class::Container;
@ISA = qw(Class::Container);

__PACKAGE__->valid_params
(
paint => {default => 'burgundy'},
style => {default => 'coupe'},
windshield => {isa => 'Glass'},
radio => {isa => 'Audio::Device'},
);

__PACKAGE__->contained_objects
(
windshield => 'Glass::Shatterproof',
wheel => { class => 'Vehicle::Wheel',
delayed => 1 },
radio => 'Audio::MP3',
);

sub new {
my $package = shift;

# 'windshield' and 'radio' objects are created automatically by
# SUPER::new()
my $self = $package->SUPER::new(@_);

$self->{right_wheel} = $self->create_delayed_object('wheel');
... do any more initialization here ...
return $self;
}

This class facilitates building frameworks of several classes that inter-operate. It was first designed and built for HTML::Mason, in which the Compiler, Lexer, Interpreter, Resolver, Component, Buffer, and several other objects must create each other transparently, passing the appropriate parameters to the right class, possibly substituting other subclasses for any of these objects.

The main features of Class::Container are:

Explicit declaration of containment relationships (aggregation, factory creation, etc.)
Declaration of constructor parameters accepted by each member in a class framework
Transparent passing of constructor parameters to the class that needs them
Ability to create one (automatic) or many (manual) contained objects automatically and transparently

Requirements:
  • Perl
    tags class container  constructor parameters  contained objects  super new  

    Download Class::Container 0.12


     http://mirrors.evolva.ro/CPAN/authors/id/K/KW/KWILLIAMS/Class-Container-0.12.tar.gz


    Authors software

    Math::BaseCalc 1.011 (by Ken Williams)
    Math::BaseCalc is a Perl module that can convert numbers between various bases.

    SYNOPSIS

    use Math::BaseCalc;

    my $calc =

    Statistics::Contingency 0.06 (by Ken Williams)
    Statistics::Contingency is a Perl module to calculate precision, recall, F1, accuracy, etc.

    SYNOPSIS

    use Statistics::Contingen

    Module::Build 0.2805 (by Ken Williams)
    Module::Build is a Perl module for build and install Perl modules.

    SYNOPSIS

    Standard process for building & installing modules:

    ExtUtils::CBuilder 0.18 (by Ken Williams)
    ExtUtils::CBuilder is a Perl module to compile and link C code for Perl modules.

    SYNOPSIS

    use ExtUtils::CBuilder;

    my $b

    Class::Container 0.12 (by Ken Williams)
    Class::Container is a Perl module with Glues object frameworks together transparently.

    SYNOPSIS

    package Car;
    use Class::Cont


    Similar software

    Class::Container 0.12 (by Ken Williams)
    Class::Container is a Perl module with Glues object frameworks together transparently.

    SYNOPSIS

    package Car;
    use Class::Cont

    Class::Cloneable 0.03 (by Stevan Little)
    Class::Cloneable is a base class for Cloneable objects.

    SYNOPSIS

    package MyObject;
    our @ISA = ('Class::Cloneable');

    #

    DBIx::Class::CDBICompat 0.07002 (by Matt S. Trout)
    DBIx::Class::CDBICompat is a Class::DBI Compatibility layer.

    SYNOPSIS

    use base qw/DBIx::Class/;
    __PACKAGE__->load_componen

    Class::Std::Utils 0.0.2 (by Damian Conway)
    Class::Std::Utils is a Perl module for utility subroutines for building "inside-out" objects.

    SYNOPSIS

    use Class::Std::Util

    Class::XML 0.06 (by Matt S Trout)
    Class::XML is a Perl module for simple XML Abstraction.

    SYNOPSIS

    package Foo;

    use base qw/Class::XML/;

    __PACKAGE__-

    Class::CGI 0.20 (by Curtis Poe)
    Class::CGI is a Perl module to fetch objects from your CGI object.

    SYNOPSIS

    use Class::CGI
    handlers => {

    DBIx::Class::FormTools 0.000004 (by David Jack Olrik)
    DBIx::Class::FormTools is a utility module for building forms with multiple related DBIx::Class objects.

    SYNOPSIS

    In the exampl

    Games::Object 0.11 (by Peter J. Stewart)
    Games::Object is a Perl module to provide a base class for game objects.

    SYNOPSIS

    package MyGameObject;
    use Games::Obj

    Class::Meta::Type 0.53 (by David Wheeler)
    Class::Meta::Type is a Perl module for data type validation and accessor building.

    SYNOPSIS

    package MyApp::TypeDef;

    use

    xDash::Archive::Pg 1.02 (by Jerzy Wachowiak)
    xDash::Archive::Pg is a base class for Archive.

    SYNOPSIS

    package Archive;
    use base xDash::Archive::Pg;
    # Set up your own d


    Other software in this category

    zlib 1.2.3 (by Jean-loup Gailly)
    zlib is designed to be a free, general-purpose, legally unencumbered, lossless data-compression library for use on virtually any comp

    libjpeg v6b (by Independent JPEG Group)
    libjpeg is a library for handling the JPEG (JFIF) image format

    OpenSSL 0.9.7c (by The OpenSSL Project Team)
    The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implement

    libxml2 2.6.27 (by DV)
    Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform), libxml2 library i

    GNU C library 2.4 (by Andreas Jaeger)
    GNU C library (glibc) is one of the most important components of GNU Hurd and most modern Linux distributions.

    GNU C library is us

  •     search


    Featured Software

    jEdit 4.3 pre8
    jEdit is an Open Source text editor written in Java

    Opera 9.02
    Surf the Internet in a safer, faster, and easier way with Opera browser

    GNU Aspell 0.60.4
    GNU Aspell is a Free and Open Source spell checker designed to eventually replace Ispell


    Subscribe in Rojo
    Google Reader
    Add to My Yahoo!

    Add to My AOL
    Subscribe with Bloglines
    Subscribe in NewsGator Online
    Add 'nixbit linux software' to Newsburst from CNET News.com
    del.icio.us nixbit linux software


    Top tags