Object::Declare 0.13
Sponsored Links
Object::Declare 0.13 Ranking & Summary
File size:
0.027 MB
Platform:
Any Platform
License:
Perl Artistic License
Price:
Downloads:
1101
Date added:
2006-10-18
Publisher:
Audrey Tang
Object::Declare 0.13 description
Object::Declare is a Perl module for declarative object constructor.
SYNOPSIS
use Object::Declare [MyApp::Column, MyApp::Param];
my %objects = declare {
param foo =>
!is global,
is immutable,
valid_values are qw( more values );
column bar =>
field1 is value,
field2 is some_other_value;
};
print $objects{foo}; # a MyApp::Param object
print $objects{bar}; # a MyApp::Column object
This module exports one function, declare, for building named objects with a declarative syntax, similar to how Jifty::DBI::Schema defines its columns.
In list context, declare returns a list of name/object pairs in the order of declaration (allowing duplicates), suitable for putting into a hash. In scalar context, declare returns a hash reference.
Using a flexible import interface, one can change exported helper functions names (declarator), words to link labels and values together (copula), and the table of named classes to declare (mapping):
use Object::Declare
declarator => [declare], # list of declarators
copula => { # list of words, or a map
is => , # from copula to prefixes for
are => , # labels built with that copula
}
aliases => { # list of label aliases:
more => less, # turns "is more" into "is less"
# and "more is 1" into "less is 1"
},
mapping => {
column => MyApp::Column, # class name to call ->new to
param => sub { # arbitrary coderef also works
bless(@_, MyApp::Param);
},
};
After the declarator block finishes execution, all helper functions are removed from the package. Same-named functions (such as &is and &are) that existed before the declarators execution are restored correctly.
SYNOPSIS
use Object::Declare [MyApp::Column, MyApp::Param];
my %objects = declare {
param foo =>
!is global,
is immutable,
valid_values are qw( more values );
column bar =>
field1 is value,
field2 is some_other_value;
};
print $objects{foo}; # a MyApp::Param object
print $objects{bar}; # a MyApp::Column object
This module exports one function, declare, for building named objects with a declarative syntax, similar to how Jifty::DBI::Schema defines its columns.
In list context, declare returns a list of name/object pairs in the order of declaration (allowing duplicates), suitable for putting into a hash. In scalar context, declare returns a hash reference.
Using a flexible import interface, one can change exported helper functions names (declarator), words to link labels and values together (copula), and the table of named classes to declare (mapping):
use Object::Declare
declarator => [declare], # list of declarators
copula => { # list of words, or a map
is => , # from copula to prefixes for
are => , # labels built with that copula
}
aliases => { # list of label aliases:
more => less, # turns "is more" into "is less"
# and "more is 1" into "less is 1"
},
mapping => {
column => MyApp::Column, # class name to call ->new to
param => sub { # arbitrary coderef also works
bless(@_, MyApp::Param);
},
};
After the declarator block finishes execution, all helper functions are removed from the package. Same-named functions (such as &is and &are) that existed before the declarators execution are restored correctly.
Object::Declare 0.13 Screenshot
Object::Declare 0.13 Keywords
MyApp
Declare 0.13
Perl module
object
declare
module
list
declarative
Perl
Object::Declare
ObjectDeclare
Object::Declare 0.13
Libraries
Programming
Bookmark Object::Declare 0.13
Object::Declare 0.13 Copyright
WareSeeker periodically updates pricing and software information of Object::Declare 0.13 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 Object::Declare 0.13 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
perl modules
install perl module
object lessons
declare mentally incompetent
myapps
myapply phoenix edu
hidden object games
declare war
installing perl module
objectives for resumes
xml parser perl module
objective
myapply.phoenix.edu
declare yourself
myapply phoenix
object desktop
sample resume objectives
i declare
Related Software
Getopt::Declare is a Perl module with Declaratively Expressed Command-Line Arguments via Regular Expressions. Free Download
HTML::Declare is a Perl module for When Template Systems Are Too Huge And Heredocs Too Messy. Free Download
Method::Declarative is a Perl module to create methods with declarative syntax. Free Download
Class::Declare is a Perl module created to declare classes with public, private and protected attributes and methods. Free Download
Class::Meta::Declare is a Perl module deprecated in favor of Class::Meta::Express. Free Download
Getopt::Clade is a Perl module with command-Line Argument Declaration Engine. Free Download
Zonestats create an RRD database with the values of CPU and memory (RSS) usage per Solaris 10 zone. Free Download
Object::Relation::Meta::Class::Schema is a Perl module for Object::Relation database store builder. Free Download
Latest Software
Popular Software
Favourite Software