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

fields::aliased 1.05

  Date Added: April 15, 2010  |  Visits: 836

fields::aliased

Report Broken Link
Printer Friendly Version


Product Homepage
Download (90 downloads)



fields::aliased is a Perl module that can create aliases for object fields. SYNOPSIS package MyPackage; use strict; use fields qw($scalar @array %hash); sub new { my $class = shift; my $self = fields::new($class); return $self; } sub mymethod { my MyPackage $self = shift; use fields::aliased qw($self $scalar @array %hash); $scalar = 1; @array = (2 .. 4); %hash = (one => 1, two => 2); } This module is a companion to the fields module, which allows efficient handling of instance variables with checking at compile time. It goes one step further and actually creates lexical aliases to the instance values, which can make code not only easier to type, but easier to read as well. Declarations You declare the fields using the fields pragma, as always. use fields qw($scalar @array %hash nosigil); Each field name may be preceded by a type sigil to indicate which kind of variable it is. Names without the type sigil are treated as scalars. For names beginning with an underscore, see "PRIVATE FIELDS" below. Constructors You call fields::new to create the object. my $self = fields::new($class); Usage In each method that uses the individual fields, you add a line similar to the following: use fields::aliased qw($self $scalar @array %hash nosigil); That is, list the variable being used for the object reference, and then the names of the fields that you are going to use in this method. fields::aliased takes care of declaring the appropriate Perl lexical variables and linking them to the appropriate field. You only need to specify the fields you are actually going to use, including any inherited from superclasses..

Requirements: No special requirements
Platforms: Linux
Keyword: Fields Fieldsaliased Hash Libraries Module Object Perl Perl Module Programming Scalar
Users rating: 0/10

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


FIELDS::ALIASED RELATED
Libraries  -  Tie::Hash::Stack 0.09
Tie::Hash::Stack is a Perl module which maintains an array of hashes like a stack. SYNOPSIS use Tie::Hash::Stack qw(pop_hash push_hash merge_hash); my %hash; tie( %hash, "Tie::Hash::Stack" ); # Ties the hash $hash{ 1 } = "one"; $hash{ 2...
6.14 KB  
Libraries  -  Hash::NoVivify 0.01
Hash::NoVivify is a Perl extension for non-vivifying exists and defined functions. SYNOPSIS use Hash::NoVivify qw(Defined Exists); ... if (Exists(%hash, qw(key1 key2 ... keyn ))) { ... } if (Defined(%hash, qw(key1 key2 ... keyn))) {...
3.07 KB  
Libraries  -  Hash::Type 1.05
Hash::Type module contains pseudo-hashes as arrays tied to a "type" (list of fields). SYNOPSIS use Hash::Type; # create a Hash::Type my $personType = new Hash::Type(qw(firstname lastname city)); # create and populate some hashes tied to...
8.19 KB  
Modules  -  User Reference Access 6.x-1.1
This module works with CCK userreference fields and the node_access module to add additional grants to nodes.To enable userref_access on a node, edit the userreference field for the node type and check the "Use User Reference Access" box.Any users...
10 KB  
Modules  -  UUID Features Integration 7.x-1.0-alpha1
The UUID Features Integration module provides a mechanism for exporting content (nodes, taxonomy, fields) into a features module. What's that you say? You thought features was only for configuration? This module is meant to be used in the cases...
10 KB  
Code Management Tools  -  Virgil B-03
Virgil projetc is an new, object-oriented, light-weight programming language that is designed for building software for resource-constrained embedded systems at the lowest level. Microcontroller programmers can now develop complete software...
583.68 KB  
Programming  -  x10 0.3.2
X10 project is a new object-oriented, type-safe programming language for programming the next generation of high performance systems. X10 is designed and developed by IBM. While developed in close contact with the designers of X10 at IBM there...
8.1 MB  
Programming  -  boo rc.0.1
boo is a new object oriented statically typed programming language for the CLI (common language infrastructure) with a python inspired syntax and a special focus on language and compiler extensibility.
1.34 MB  
Programming  -  Intrepid 2D Game Library 1.0
Intrepid is an object-oriented 2D game programming library written in C++ utilizing OpenGL and SDL that takes care of the low-level programming involved in making 2D games.You can create nearly every kind of 2D game. Comes with...
139.58 KB  
Libraries  -  Set::Hash 0.01
Set::Hash is a Perl module with hashes as objects with lots of handy methods (including set comparisons) and support for method chaining. SYNOPSIS use Set::Hash; my $sh1 = Set::Hash->new(name=>"dan",age=>33); my $sh2 =...
7.17 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