fields::aliased 1.05
Sponsored Links
fields::aliased 1.05 Ranking & Summary
File size:
0.008 MB
Platform:
Any Platform
License:
Perl Artistic License
Price:
Downloads:
894
Date added:
2007-05-14
Publisher:
Kevin Michael Vail
fields::aliased 1.05 description
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.
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.
fields::aliased 1.05 Screenshot
fields::aliased 1.05 Keywords
Perl module
Can Create
fields
module
object
Perl
scalar
hash
fields::aliased
fieldsaliased
fields::aliased 1.05
Libraries
Programming
Bookmark fields::aliased 1.05
fields::aliased 1.05 Copyright
WareSeeker periodically updates pricing and software information of fields::aliased 1.05 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of fields::aliased 1.05 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
fieldstone mortgage
marshall fields
fieldstone cinemas
fields of gold lyrics
fieldstone cabinets
mrs fields
magnetic fields
fields of anfield road
perl modules
comedian fields
fields bmw
fieldstone
fieldsheer leather
fieldset
top 10 fastest growing career fields
fields of gold eva cassidy
paintball fields
install perl module
Related Software
Tie::Scalar::Sticky is a Perl module with block assignments to scalars. Free Download
Tie::Trace can easy print debugging with tie. Free Download
Convert::Scalar is a Perl module that can convert between different representations of perl scalars. Free Download
Sys::Lastlog is a Perl module to provide a moderately Object Oreiented Interface to lastlog files on some Unix-like systems. Free Download
Devel::CallerItem is an Perl object representing a function call from the stack of function calls. Free Download
Scalar::Defer is a Perl module to calculate values on demand. Free Download
Object::Trampoline is a Perl module for delay object construction. Free Download
Test::Data is a Perl module to test functions for particular variable types. Free Download
Latest Software
Popular Software
Favourite Software