Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.216.318 Times

Object::Realize::Later 0.16

  Date Added: February 02, 2010  |  Visits: 872

Object::Realize::Later

Report Broken Link
Printer Friendly Version


Product Homepage
Download (88 downloads)



Object::Realize::Later is a Perl module with delayed creation of objects. SYNOPSIS package MyLazyObject; use Object::Realize::Later becomes => MyRealObject, realize => load; The Object::Realize::Later class helps with implementing transparent on demand realization of object data. This is related to the tricks on autoloading of data, the lesser known cousin of autoloading of functionality. On demand realization is all about performance gain. Why should you spent costly time on realizing an object, when the data on the object is never (or not yet) used? In interactive programs, postponed realization may boost start-up: the realization of objects is triggered by the use, so spread over time. METHODS Construction use(Object::Realize::Later OPTIONS) When you invoke (use) the Object::Realize::Later package, it will add a set of methods to your package (see section "Added to YOUR class"). Option --Default becomes < required > believe_caller < false > realize < required > source_module < becomes > warn_realization < false > warn_realize_again < false > . becomes CLASS Which type will this object become after realization. . believe_caller BOOLEAN When a method is called on the un-realized object, the AUTOLOAD checks whether this resolves the need. If not, the realization is not done. However, when realization may result in an object that extends the functionality of the class specified with becomes, this check must be disabled. In that case, specify true for this option. . realize METHOD|CODE How will transform. If you specify a CODE reference, then this will be called with the lazy-object as first argument, and the requested method as second. After realization, you may still have your hands on the lazy object on various places. Be sure that your realization method is coping with that, for instance by using Memoize. See examples below. . source_module CLASS if the class (a package) is included in a file (module) with a different name, then use this argument to specify the file name. The name is expected to be the same as in the require call which would load it. . warn_realization BOOLEAN Print a warning message when the realization starts. This is for debugging purposes. . warn_realize_again BOOLEAN When an object is realized, the original object -which functioned as a stub- is reconstructed to work as proxy to the realized object. This option will issue a warning when that proxy is used, which means that somewhere in your program there is a variable still holding a reference to the stub. This latter is not problematic at all, although it slows-down each method call. Added to YOUR class $obj->AUTOLOAD When a method is called which is not available for the lazy object, the AUTOLOAD is called. $obj->can(METHOD) Object::Realize::Later->can(METHOD) Is the specified METHOD available for the lazy or the realized version of this object? It will return the reference to the code. Example: MyLazyObject->can(lazyWork) # true MyLazyObject->can(realWork) # true my $lazy = MyLazyObject->new; $lazy->can(lazyWork); # true $lazy->can(realWork); # true $obj->forceRealize You can force the load by calling this method on your object. It returns the realized object. Object::Realize::Later->isa(CLASS) Is this object a (sub-)class of the specified CLASS or can it become a (sub-)class of CLASS. Example: MyLazyObject->isa(MyRealObject) # true MyLazyObject->isa(SuperClassOfLazy); # true MyLazyObject->isa(SuperClassOfReal); # true my $lazy = MyLazyObject->new; $lazy->isa(MyRealObject); # true $lazy->isa(SuperClassOfLazy); # true $lazy->isa(SuperClassOfReal); # true $obj->willRealize Returns which class will be the realized to follow-up this class. Object::Realize::Later internals The next methods are not exported to the class where the `use took place. These methods implement the actual realization. Object::Realize::Later->import(OPTIONS) The OPTIONS used for import are the values after the class name with use. So this routine implements the actual option parsing. It generates code dynamically, which is then evaluated in the callers name-space. Object::Realize::Later->realizationOf(OBJECT [,REALIZED]) Returns the REALIZED version of OBJECT, optionally after setting it first. When the method returns undef, the realization has not yet taken place or the realized object has already been removed again. Object::Realize::Later->realize(OPTIONS) This method is called when a $object-forceRealize()> takes place. It checks whether the realization has been done already (is which case the realized object is returned).

Requirements: No special requirements
Platforms: Linux
Keyword: Autoload Boolean Class Isa Libraries Method Mylazyobject Object Objectrealizelater Options Perl Module Realization Realized True
Users rating: 0/10

License: Freeware Size: 10.24 KB
USER REVIEWS
More Reviews or Write Review


OBJECT::REALIZE::LATER RELATED
Libraries  -  Games::Object 0.11
Games::Object is a Perl module to provide a base class for game objects. SYNOPSIS package MyGameObject; use Games::Object; use vars qw(@ISA); @ISA = qw(Games::Object); sub new { # Create object my $proto = shift; my $class =...
84.99 KB  
Libraries  -  Class::MOP 0.35
Class::MOP is a Meta Object Protocol for Perl 5. SYNOPSIS # ... This will come later, for now see # the other SYNOPSIS for more information This module is an attempt to create a meta object protocol for the Perl 5 object system. It makes no...
73.73 KB  
Libraries  -  Ace::Object 1.89
Ace::Object is a Perl module to manipulate Ace Data Objects. SYNOPSIS # open database connection and get an object use Ace; $db = Ace->connect(-host => beta.crbm.cnrs-mop.fr, -port => 20000100); $sequence = $db->fetch(Sequence => D12345);...
296.96 KB  
Libraries  -  Basset::Object 1.04
Basset::Object is a Perl module used to create objects. This is my ultimate object creation toolset to date. It has roots in Mail::Bulkmail, Text::Flowchart, and the unreleased abstract object constructors that Ive tooled around with in the...
143.36 KB  
Libraries  -  Flash::FLAP::Object 0.09
Flash::FLAP::Object is a Perl module translated from PHP Remoting v. 0.5b from the -PHP project. Package used for building and retreiving header and body information. Installation: 1a. If you have access to Macromedia Flash MX, load the...
440.32 KB  
Libraries  -  File::Basename::Object 0.01
File::Basename::Object is a Perl module with object-oriented syntax sugar for File::Basename. SYNOPSIS my $file = File::Basename::Object->new("/path/to/a/file.html", ".htm", ".html"); if(open(my $fh, <, $file)) { print "Now reading ",...
4.1 KB  
Libraries  -  Class::Method::hash 2.08
Class::Method::hash is a Perl module that helps you create methods for handling a hash value. SYNOPSIS use Class::MethodMaker [ hash => [qw/ x /] ]; $instance->x; # empty $instance->x(a => 1, b => 2, c => 3); $instance->x_count == 3; #...
89.09 KB  
Libraries  -  Object::Trampoline 1.25
Object::Trampoline is a Perl module for delay object construction, and optionally using the class module, until a method is actually dispatched, simplifies runtime definition of handler classes. SYNOPSIS # adding "use_class" will perform an...
9.22 KB  
Libraries  -  Object::Relation::Meta::Class::Schema 0.1.0
Object::Relation::Meta::Class::Schema is a Perl module for Object::Relation database store builder. This module is provides metadata for all Object::Relation classes while building a storage schema. Loading Object::Relation::Schema causes it to...
24.58 KB  
Libraries  -  Class::DataStore 0.07
Class::DataStore is a Perl module for generic OO data storage/retrieval. SYNOPSIS my %values = ( one => 1, two => 2 ); my $store = Class::DataStore->new( %values ); # using get/set methods $store->set( three, 3 ); my $three = $store->get(...
4.1 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB