Class::Meta::Express 0.04

Class::Meta::Express 0.04

Sponsored Links

Class::Meta::Express 0.04 Ranking & Summary

Ranking Click at the star to rankRanking level:
User Review: 0 (0 times) Download now
File size: 0.009 MB Platform: Any Platform License: Perl Artistic License Price: Downloads: 8046 Date added: 2006-10-19 Publisher: David Wheeler Publisher URL: http://search.cpan.org/~d

Class::Meta::Express 0.04 description

Class::Meta::Express is a Perl module for concise, expressive creation of Class::Meta classes.

Synopsis

package My::Contact;
use Class::Meta::Express;

class {
meta contact => ( default_type => string );
has name;
has contact => ( required => 1 );
}

This module provides an interface to concisely yet expressively create classes with Class::Meta. Although I am of course fond of Class::Meta, Ive never been overly thrilled with its interface for creating classes:

package My::Thingy;
use Class::Meta;

BEGIN {
# Create a Class::Meta object for this class.
my $cm = Class::Meta->new( key => thingy );

# Add a constructor.
$cm->add_constructor( name => new );

# Add a couple of attributes with generated accessors.
$cm->add_attribute(
name => id,
is => integer,
required => 1,
);

$cm->add_attribute(
name => name,
is => string,
required => 1,
);

$cm->add_attribute(
name => age,
is => integer,
);

# Add a custom method.
$cm->add_method(
name => chk_pass,
code => sub { return code },
);
$cm->build;
}

This example is relatively simple; it can get a lot more verbose. But even still, all of the method calls were annoying. I mean, whoever thought of using an object oriented interface for declaring a class? (Oh yeah: I did.) I wasnt alone in wanting a more declarative interface; Curtis Poe, with my blessing, created Class::Meta::Declare, which would use this syntax to create the same class:

package My::Thingy;
use Class::Meta::Declare :all;

Class::Meta::Declare->new(
# Create a Class::Meta object for this class.
meta => [
key => thingy,
],
# Add a constructor.
constructors => [
new => { }
],
# Add a couple of attributes with generated accessors.
attributes => [
id => {
type => $TYPE_INTEGER,
required => 1,
},
name => {
required => 1,
type => $TYPE_STRING,
},
age => { type => $TYPE_INTEGER, },
],
# Add a custom method.
methods => [
chk_pass => {
code => sub { return code },
}
]
);

This approach has the advantage of being a bit more concise, and it is declarative, but I find all of the indentation levels annoying; its hard for me to figure out where I am, especially if I have to define a lot of attributes. And finally, everything is a string with this syntax, except for those ugly read-only scalars such as $TYPE_INTEGER. So I cant easily tell where one attribute ends and the next one starts. Bleh.

Download now

Class::Meta::Express 0.04 Screenshot

Sponsored Links
Download Class::Meta::Express 0.04

Class::Meta::Express 0.04 Keywords

Bookmark Class::Meta::Express 0.04

Hyperlink code:
Hyperlink and Intro code:

Class::Meta::Express 0.04 Copyright

WareSeeker periodically updates pricing and software information of Class::Meta::Express 0.04 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::Meta::Express 0.04 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::Meta::Express 0.04 Related Software


This project is to produce drivers for the Logitech Quickam Express that will run popular linux software, such as video for linu

DVD BacKup Express is a small Kommander Script to create a GUI for dvdbackup.

American Express Expense Report to QIF Converter is a utility that converts American Express expense reports into QIF.

Class::MOP is a Meta Object Protocol for Perl 5.

Class::Meta is a Perl class automation, introspection, and data validation.

Class::Meta::Declare is a Perl module deprecated in favor of Class::Meta::Express.

Class::Meta::Type is a Perl module for data type validation and accessor building.

Object::Relation::Meta::Class::Schema is a Perl module for Object::Relation database store builder.

VBA Express is a frontend for the very popular game emulator VisualBoyAdvance.

SIP Express Router is a very fast and flexible SIP (RFC3261) server.
Class::Meta::Express 0.04 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