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

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

Serving Software Downloads in 976 Categories, Downloaded 29.545.093 Times

Object::Realize::Later 0.16

  Date Added: February 02, 2010  |  Visits: 582

Object::Realize::Later

Report Broken Link
Printer Friendly Version


Product Homepage
Download (71 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  -  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  -  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  -  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  
Libraries  -  dtRdr::Traits::Class 0.0.11
dtRdr::Traits::Class is a Perl module with shared OO stuff. Methods to Break Things NOT_IMPLEMENTED Imported into base class. Gives a nicer message than the standard "Cant locate method...", indicating that you did not typo the method name,...
2.8 MB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and...
327.68 KB  
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  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
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  
Libraries  -  App::SimpleScan::Substitution::Line 2.02
App::SimpleScan::Substitution::Line is a line with optional fixed variable values. SYNOPSIS my $line = App::SimpleScan::Substitution::Line->new(" this "); # Use only this value when substituting " ". $line->fix(substituite =>...
54.27 KB