Class::Struct::FIELDS 1.1

Class::Struct::FIELDS 1.1

Sponsored Links

Class::Struct::FIELDS 1.1 Ranking & Summary

Ranking Click at the star to rankRanking level:
User Review: 0 (0 times) Download now
File size: 0.018 MB Platform: Any Platform License: Perl Artistic License Price: Downloads: 8569 Date added: 2007-07-11 Publisher: B. K. Oxley Publisher URL: http://search.cpan.org/~b

Class::Struct::FIELDS 1.1 description

Class::Struct::FIELDS module combine Class::Struct, base and fields.

SYNOPSIS

(This page documents Class::Struct::FIELDS v.1.1.)
use Class::Struct::FIELDS;
# declare struct, based on fields, explicit class name:
struct (CLASS_NAME => { ELEMENT_NAME => ELEMENT_TYPE, ... });

use Class::Struct::FIELDS;
# declare struct, based on fields, explicit class name
# with inheritance:
struct (CLASS_NAME => [qw(BASE_CLASSES ...)],
{ ELEMENT_NAME => ELEMENT_TYPE, ... });

package CLASS_NAME;
use Class::Struct::FIELDS;
# declare struct, based on fields, implicit class name:
struct (ELEMENT_NAME => ELEMENT_TYPE, ...);

package CLASS_NAME;
use Class::Struct::FIELDS;
# declare struct, based on fields, implicit class name
# with inheritance:
struct ([qw(BASE_CLASSES ...)], ELEMENT_NAME => ELEMENT_TYPE, ...);

package MyObj;
use Class::Struct::FIELDS;
# declare struct with four types of elements:
struct (s => $, a => @, h => %, x => &, c => My_Other_Class);

$obj = new MyObj; # constructor

# scalar type accessor:
$element_value = $obj->s; # element value
$obj->s (new value); # assign to element

# array type accessor:
$ary_ref = $obj->a; # reference to whole array
$ary_element_value = $obj->a->[2]; # array element value
$ary_element_value = $obj->a (2); # same thing
$obj->a->[2] = new value; # assign to array element
$obj->a (2, newer value); # same thing

# hash type accessor:
$hash_ref = $obj->h; # reference to whole hash
$hash_element_value = $obj->h->{x}; # hash element value
$hash_element_value = $obj->h (x); # same thing
$obj->h->{x} = new value; # assign to hash element
$obj->h (x, newer value); # same thing

# code type accessor:
$code_ref = $obj->x; # reference to code
$obj->x->(...); # call code
$obj->x (sub {...}); # assign to element

# regexp type accessor:
$regexp = $obj->r; # reference to code
$string =~ m/$obj->r/; # match regexp
$obj->r (qr/ ... /); # assign to element

# class type accessor:
$element_value = $obj->c; # object reference
$obj->c->method (...); # call method of object
$obj->c (My_Other_Class::->new); # assign a new object

Class::Struct::FIELDS exports a single function, struct. Given a list of element names and types, and optionally a class name and/or an array reference of base classes, struct creates a Perl 5 class that implements a "struct-like" data structure with inheritance.

The new class is given a constructor method, new, for creating struct objects.
Each element in the struct data has an accessor method, which is used to assign to the element and to fetch its value. The default accessor can be overridden by declaring a sub of the same name in the package. (See Example 2.)

Each elements type can be scalar, array, hash, code or class.

Download now

Class::Struct::FIELDS 1.1 Screenshot

Sponsored Links
Download Class::Struct::FIELDS 1.1

Class::Struct::FIELDS 1.1 Keywords

Bookmark Class::Struct::FIELDS 1.1

Hyperlink code:
Hyperlink and Intro code:

Class::Struct::FIELDS 1.1 Copyright

WareSeeker periodically updates pricing and software information of Class::Struct::FIELDS 1.1 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 Class::Struct::FIELDS 1.1 Edition. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Class::Struct::FIELDS 1.1 Related Software


UnHide fields provides this extension allow you to view and edit hidden fields content.

Resizeable Form Fields is an extension which allows you to resize HTML form fields, including textareas, select boxes and more.

Sort::Fields is a Perl module that can sort lines containing delimited fields.

fields::aliased is a Perl module that can create aliases for object fields.

Struct::Compare is a recursive diff for perl structures.

Test::Struct is a Perl extension for testing for structural equivelence.

MP3::Tag::LastResort is a Perl module for using other fields to fill autoinfo fields.

Inline::Struct is a Perl module that manipulate C structures directly from Perl.

C::DynaLib::Struct is a tool for handling the C `struct data type.

Crimson Fields is a tactical war game in the tradition of Battle Isle.
Class::Struct::FIELDS 1.1 Review:
Author name* :  
Author Email* :  
Comment* :  
Security code* :  
     
   
My Software
You have not saved any software. Click "Save" next to each software to save it to your software basket
Related Information
Sponsored Links
TOP POPULAR DOWNLOAD