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.181.320 Times

Object::Trampoline 1.25

  Date Added: January 13, 2010  |  Visits: 935

Object::Trampoline

Report Broken Link
Printer Friendly Version


Product Homepage
Download (92 downloads)



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 "eval use $class" # at the point where the object is first accessed. use Object::Trampoline; # the real class name is added to the normal constructor # and Object::Trampoline used instead. the destination # class constructor is called when object is actually # used for something. my $dbh = Object::Trampoline->connect( DBI, $dsn, $user, $pass, $conf ); my $sth = $dbh->prepare( select foo from bar ); # or specify the package and args from a config file # or via inherited data. # # the constructor lives in the destination class # and has nothing to do with Object::Trampoline. my %config = Config->read( $config_file_path ); my ( $class, $const, @argz ) = @config{ qw( class const args ) }; my $handle = Object::Trampoline->$const( $class, @argz ); # at this point ref $handle is Object::Trampoline::Bounce. $handle->frobnicate( @stuff ); # at this point ref $handle is $class # there are times when it is helpful to delay using # the objects class module until the object is # instantiated. O::T::U adds the callers package # and a "use $class" before the constructor. my $lazy = Object::Trampoline::Use->frobnicate( $class, @stuff ); my $result = $lazy->susan( dessert ); There are times when constructing an object is expensive or has to be delayed -- database handles in heavily forked apache servers are one example. This module creates a "trampoline" object: when called it replaces the object you have with the object you want. The module itself consists only of two AUTOLOADS: one with captures the constructor call, the other the first method call. The first class blesses a closure which creates the necessary object into the second class, which replces $_[0] with a new object and re-dispatches the call into the proper class. Using an autoload as the constructor allows Object::Trampoline to use whatever constructor name the "real" class uses without having to pass it as another argument..

Requirements: No special requirements
Platforms: Linux
Keyword: Class Constructor Delay Libraries Module Object Objecttrampoline Perl Perl Module Programming
Users rating: 0/10

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


OBJECT::TRAMPOLINE RELATED
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  -  Class::Contract 1.00
Class::Contract - Design-by-Contract OO in Perl. SYNOPSIS package ClassName use Class::Contract; contract { inherits BaseClass; invar { ... }; attr data1; attr data2 => HASH; class attr shared => SCALAR; ctor new; method...
26.62 KB  
Libraries  -  Audio::MadJACK 0.04
Audio::MadJACK is a Perl module to talk to MadJACK server using Object Oriented Perl. SYNOPSIS use Audio::MadJACK; my $mj = new Audio::MadJACK( osc.udp://madjack.example.net:4444/ ); $mj->load( Playlist_A/mymusic.mp3 ); $mj->play(); The...
5.12 KB  
Programming  -  Ongoing Object-Oriented Perl Project 1.0
Download code, Learn code, Share code.The Ongoing Object-oriented Perl Project.scripts, tutorials, modules, case studies, anything OOPerl --not excluding contributions of OO discipline in other programming languages.
772.4 KB  
Libraries  -  Object::Realize::Later 0.16
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...
10.24 KB  
Libraries  -  Locale::Object::Language 0.75
Locale::Object::Language Perl module contains language information objects. Locale::Object::Language allows you to create objects containing information about languages such as their ISO codes, the countries theyre used in and so on. SYNOPSIS...
47.1 KB  
Libraries  -  GD::Graph::Thermometer 0.05
GD::Graph::Thermometer is a Perl module to generate progress graph on the fly. SYNOPSIS use GD::Graph::Thermometer; my $result = GD::Graph::Thermometer->new({ image_path => /path/to/image.png, type => png, goal => 80000, current => 20000,...
7.17 KB  
Libraries  -  DWH_File 0.24
DWH_File module contains data and object persistence in deep and wide hashes. SYNOPSIS use DWH_File qw/ GDBM_File /; # the use argument set the DBM module used tie( %h, DWH_File, myFile, O_RDWR|O_CREAT, 0644 ); untie( %h ); # essential!...
23.55 KB  
Libraries  -  RADIUS::Packet 1.0
RADIUS::Packet is an object-oriented Perl interface to RADIUS packets. SYNOPSIS use RADIUS::Packet; use RADIUS::Dictionary; my $d = new RADIUS::Dictionary "/etc/radius/dictionary"; my $p = new RADIUS::Packet $d, $data; $p->dump; if...
43.01 KB  
Libraries  -  Net::Whois::RIPE 1.23
Net::Whois::RIPE is an object-oriented Perl library module that provides methods to query, retrieve, and update RIPE-157 formatted objects from whois servers that support this format. In particular, both the Asian and European Internet...
32.77 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