Main > Free Download Search >

Free class meta express software for linux

class meta express

Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 2992
Class::Meta::Express 0.04

Class::Meta::Express 0.04


Class::Meta::Express is a Perl module for concise, expressive creation of Class::Meta classes. more>>
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.

<<less
Download (0.009MB)
Added: 2006-10-19 License: Perl Artistic License Price:
1105 downloads
Class::Meta 0.53

Class::Meta 0.53


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

SYNOPSIS

Generate a class:
package MyApp::Thingy;
use strict;
use Class::Meta;
use Class::Meta::Types::String;
use Class::Meta::Types::Numeric;

BEGIN {

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

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

# Add a couple of attributes with generated methods.
$cm->add_attribute(
name => uuid,
authz => Class::Meta::READ,
type => string,
required => 1,
default => sub { Data::UUID->new->create_str },
);
$cm->add_attribute(
name => name,
is => string,
required => 1,
default => undef,
);
$cm->add_attribute(
name => age,
is => integer,
default => undef,
);

# Add a custom method.
$cm->add_method(
name => chk_pass,
view => Class::Meta::PUBLIC,
);
$cm->build;
}
Then use the class:
use MyApp::Thingy;

my $thingy = MyApp::Thingy->new;
print "ID: ", $thingy->id, $/;
$thingy->name(Larry);
print "Name: ", $thingy->name, $/;
$thingy->age(42);
print "Age: ", $thingy->age, $/;
Or make use of the introspection API:
use MyApp::Thingy;

my $class = MyApp::Thingy->my_class;
my $thingy;

print "Examining object of class ", $class->package, $/;

print "nConstructors:n";
for my $ctor ($class->constructors) {
print " o ", $ctor->name, $/;
$thingy = $ctor->call($class->package);
}

print "nAttributes:n";
for my $attr ($class->attributes) {
print " o ", $attr->name, " => ", $attr->get($thingy), $/;
if ($attr->authz >= Class::Meta::SET && $attr->type eq string) {
$attr->get($thingy, hey there!);
print " Changed to: ", $attr->get($thingy), $/;
}
}

print "nMethods:n";
for my $meth ($class->methods) {
print " o ", $meth->name, $/;
$meth->call($thingy);
}

Class::Meta provides an interface for automating the creation of Perl classes with attribute data type validation. It differs from other such modules in that it includes an introspection API that can be used as a unified interface for all Class::Meta-generated classes. In this sense, it is an implementation of the "Facade" design pattern.

<<less
Download (0.060MB)
Added: 2006-10-05 License: Perl Artistic License Price:
1114 downloads
Class::Meta::Declare 0.04

Class::Meta::Declare 0.04


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

SYNOPSIS

This was a first attempt at making a saner interface for Class::Meta. It is nicer, but Class::Meta::Express is nicer still. Go use that one.

package MyApp::Thingy;
use Class::Meta::Declare :all;
use Data::UUID;

Class::Meta::Declare->new(
meta => [
key => thingy,
accessors => $ACC_SEMI_AFFORDANCE,
],
attributes => [
pi => {
context => $CTXT_CLASS,
authz => $AUTHZ_READ,
default => 3.1415927,
},
id => {
authz => $AUTHZ_READ,
type => $TYPE_STRING,
default => sub { Data::UUID->new->create_str },
},
name => {
required => 1,
type => $TYPE_STRING,
default => No Name Supplied,
},
age => { type => $TYPE_INTEGER, },
],
methods => [
some_method => {
view => $VIEW_PUBLIC,
code => sub {
my $self = shift;
return [ reverse @_ ];
},
}
]
);

my $object = MyApp::Thingy->new;
print MyApp::Thingy->pi; # prints 3.1415927
print $object->name; # prints "No Name Supplied;
$object->set_name("bob");
print $object->name; # prints "bob"

This class provides an alternate interface for Class::Meta.

Class::Meta is a useful module which allows one to create Perl classes which support introspection (also known as reflection). Typically Perl classes, when created, dont supply a lot of metadata. Imported helper functions show up when you call $object->can($method). Private, protected and trusted methods are not readily supported. Fetching a list of attributes or methods is a haphazard affair. Class::Meta overcomes these shortcomings by building the classes for you and allowing you to fetch a class object:

my $class_object = $object->my_class;

foreach my $attribute ( $class_object->attributes ) {
print $attribute->name, "n";
}
foreach my $method ( $class_object->methods ) {
print $method->name, "n";
}

If youve set up your class correctly, these properties are now easy to discover.

Unfortunately, many find the Class::Meta interface to be a bit clumsy. As an alternative, Class::Meta::Declare allows you to declare your entire class in a single argument list to the constructor and have the class built for you automatically. Further, reasonable defaults are provided for just about everything.

IMPORTANT: You want this class or Class::Meta if you need an introspection API for your classes. If you do not need introspection or dynamic class generation, these modules are overkill.

<<less
Download (0.015MB)
Added: 2006-09-27 License: Perl Artistic License Price:
1122 downloads
Class::Meta::Type 0.53

Class::Meta::Type 0.53


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

SYNOPSIS

package MyApp::TypeDef;

use strict;
use Class::Meta::Type;
use IO::Socket;

my $type = Class::Meta::Type->add( key => io_socket,
desc => IO::Socket object,
name => IO::Socket Object );

This class stores the various data types used by Class::Meta. It manages all aspects of data type validation and method creation. New data types can be added to Class::Meta::Type by means of the add() constructor. This is useful for creating custom types for your Class::Meta-built classes.

Note:This class manages the most advanced features of Class::Meta. Before deciding to create your own accessor closures as described in add(), you should have a thorough working knowledge of how Class::Meta works, and have studied the add() method carefully. Simple data type definitions such as that shown in the SYNOPSIS, on the other hand, are encouraged.

<<less
Download (0.060MB)
Added: 2006-09-22 License: Perl Artistic License Price:
1127 downloads
VBA Express 1.2

VBA Express 1.2


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

Whats VBA Express? Its First, to configure VisualBoyAdvance (emulator)... EASILY! Graphics, sound, controls (keyboard and joystick), paths (to saves and captures)... You can configure all this without edit VisualBoyAdvance.cfg manually!

Open your Roms (games) with the frontend! You can run the roms with "Play!" button (without using the console command VisualBoyAdvance game.rom).

<<less
Download (1.3MB)
Added: 2006-11-04 License: GPL (GNU General Public License) Price:
1125 downloads
DVD BacKup Express 5

DVD BacKup Express 5


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

I made it because it can be run on any platform with kommander installed and dvdbackup available (which may be more platforms than kdvdbackup or other binary frontends are available for)

There is a lot of room for improvement here. Feel free to spruce it up a bit and send me the new .kmdr file and i will update this.

<<less
Download (0.004MB)
Added: 2006-02-15 License: GPL (GNU General Public License) Price:
1354 downloads
Class::Interfaces 0.04

Class::Interfaces 0.04


Class::Interfaces is a Per module for defining interface classes inline. more>>
Class::Interfaces is a Per module for defining interface classes inline.

SYNOPSIS

# define some simple interfaces
use Class::Interfaces (
Serializable => [ pack, unpack ],
Printable => [ toString ],
Iterable => [ iterator ],
Iterator => [ hasNext, next ]
);

# or some more complex ones ...

# interface can also inherit from
# other interfaces using this form
use Class::Interfaces (
BiDirectionalIterator => {
isa => Iterator,
methods => [ hasPrev, prev ]
},
ResetableIterator => {
isa => Iterator,
methods => [ reset ]
},
# we even support multiple inheritance
ResetableBiDirectionalIterator => {
isa => [ ResetableIterator, BiDirectionalIterator ]
}
);

# it is also possible to create an
# empty interface, sometimes called
# a marker interface
use Class::Interfaces (
JustAMarker => undef
);

This module provides a simple means to define abstract class interfaces, which can be used to program using the concepts of interface polymorphism.

<<less
Download (0.006MB)
Added: 2006-10-05 License: Perl Artistic License Price:
1115 downloads
Class::Method::hash 2.08

Class::Method::hash 2.08


Class::Method::hash is a Perl module that helps you create methods for handling a hash value. more>>
Class::Method::hash is a Perl module that helps you create methods for handling a hash value.

SYNOPSIS

use Class::MethodMaker
[ hash => [qw/ x /] ];

$instance->x; # empty
$instance->x(a => 1, b => 2, c => 3);
$instance->x_count == 3; # true
$instance->x = (b => 5, d => 8); # Note this *replaces* the hash,
# not adds to it
$instance->x_index(b) == 5; # true
$instance->x_exists(c); # false
$instance->x_exists(d); # true

Creates methods to handle hash values in an object. For a component named x, by default creates methods x, x_reset, x_clear, x_isset, x_count, x_index, x_keys, x_values, x_each, x_exists, x_delete, x_set, x_get.

<<less
Download (0.087MB)
Added: 2007-07-05 License: Perl Artistic License Price:
841 downloads
Class::Maker 0.05.18

Class::Maker 0.05.18


Class::Maker Perl module contains classes, reflection, schema, serialization, attribute- and multiple inheritance. more>>
Class::Maker Perl module contains classes, reflection, schema, serialization, attribute- and multiple inheritance.

SYNOPSIS

use Class::Maker qw(class);
class Human, { isa => [qw( ParentClass )],
public =>
{
string => [qw(name lastname)],

ref => [qw(father mother)],

array => [qw(friends)],

custom => [qw(anything)],
},

private =>
{
int => [qw(dummy1 dummy2)],
},

configure =>
{
ctor => create,

explicit => 0,
},
};
sub Human::greeting : method { my $this = shift;
printf This is %s (%d), $this->name, $this->uid;
}
class UnixUser, { isa => [qw( Human )],
public =>
{
int => [qw(uid gid)],

string => [qw(username)],
},
};

my $a = Human->new( uid => 1, gid => 2, name => Bart );

$a->father( Human->new( name => Houmer ) );

$a->greeting();

$a->uid = 12;

$a->_dummy1( bla );

Class::Maker introduces the concept of classes via a "class" function. It automatically creates packages, ISA, new and attribute-handlers. The classes can inherit from common perl-classes and class-maker classes. Single and multiple inheritance is supported.

This package is for everybody who wants to program oo-perl and does not really feel comfortable with the common way.

Java-like reflection is also implemented and allows one to inspect the class properties and methods during runtime. This is helpfull for implementing persistance and serialization. A Tangram (see cpan) schema generator is included to the package, so one can use Tangram object-persistance on the fly as long as he uses Class::Maker classes.

<<less
Download (0.048MB)
Added: 2007-06-01 License: Perl Artistic License Price:
879 downloads
Class::Generate 1.09

Class::Generate 1.09


Class::Generate is a Perl module that can generate Perl class hierarchies. more>>
Class::Generate is a Perl module that can generate Perl class hierarchies.

SYNOPSIS

use Class::Generate qw(class subclass delete_class);

# Declare class Class_Name, with the following types of members:
class
Class_Name => [
s => $, # scalar
a => @, # array
h => %, # hash
c => Class, # Class
c_a => @Class, # array of Class
c_h => %Class, # hash of Class
&m => body, # method
];

# Allocate an instance of class_name, with members initialized to the
# given values (pass arrays and hashes using references).
$obj = Class_Name->new ( s => scalar,
a => [ values ],
h => { key1 => v1, ... },
c => Class->new,
c_a => [ Class->new, ... ],
c_h => [ key1 => Class->new, ... ] );

# Scalar type accessor:
$obj->s($value); # Assign $value to member s.
$member_value = $obj->s; # Access members value.

# (Class) Array type accessor:
$obj->a([value1, value2, ...]); # Assign whole array to member.
$obj->a(2, $value); # Assign $value to array member 2.
$obj->add_a($value); # Append $value to end of array.
@a = $obj->a; # Access whole array.
$ary_member_value = $obj->a(2); # Access array member 2.
$s = $obj->a_size; # Return size of array.
$value = $obj->last_a; # Return last element of array.

# (Class) Hash type accessor:
$obj->h({ k_1=>v1, ..., k_n=>v_n }) # Assign whole hash to member.
$obj->h($key, $value); # Assign $value to hash member $key.
%hash = $obj->h; # Access whole hash.
$hash_member_value = $obj->h($key); # Access hash member value $key.
$obj->delete_h($key); # Delete slot occupied by $key.
@keys = $obj->h_keys; # Access keys of member h.
@values = $obj->h_values; # Access values of member h.

$another = $obj->copy; # Copy an object.
if ( $obj->equals($another) ) { ... } # Test equality.

subclass s => [ ], -parent => class_name;

The Class::Generate package exports functions that take as arguments a class specification and create from these specifications a Perl 5 class. The specification language allows many object-oriented constructs: typed members, inheritance, private members, required members, default values, object methods, class methods, class variables, and more.

CPAN contains similar packages. Why another? Because object-oriented programming, especially in a dynamic language like Perl, is a complicated endeavor. I wanted a package that would work very hard to catch the errors you (well, I anyway) commonly make. I wanted a package that could help me enforce the contract of object-oriented programming. I also wanted it to get out of my way when I asked.

<<less
Download (0.052MB)
Added: 2007-07-31 License: Perl Artistic License Price:
815 downloads
IBM DB2 Express-C 9.5

IBM DB2 Express-C 9.5


IBM DB2 Express-C is a free database for storing and managing relational and XML data. It is free to download, use, distribute and does not have any e... more>> <<less
Download (290967KB)
Added: 2009-04-06 License: Freeware Price: Free
200 downloads
Class::ObjectTemplate 0.7

Class::ObjectTemplate 0.7


Class::ObjectTemplate is a Perl extension for an optimized template builder base class. more>>
Class::ObjectTemplate is a Perl extension for an optimized template builder base class.

SYNOPSIS

package Foo;
use Class::ObjectTemplate;
require Exporter;
@ISA = qw(Class::ObjectTemplate Exporter);

attributes(one, two, three);

# initialize will be called by new()
sub initialize {
my $self = shift;
$self->three(1) unless defined $self->three();
}

use Foo;
$foo = Foo->new();

# store 27 in the one attribute
$foo->one(27);

# check the value in the two attribute
die "should be undefined" if defined $foo->two();

# set using the utility method
$foo->set_attribute(one,27);

# check using the utility method
$two = $foo->get_attribute(two);

# set more than one attribute using the named parameter style
$foo->set_attributes(one=>27, two=>42);

# or using array references
$foo->set_attributes([one,two],[27,42]);

# get more than one attribute
@list = $foo->get_attributes(one, two);

# get a list of all attributes known by an object
@attrs = $foo->get_attribute_names();

# check that initialize() is called properly
die "initialize didnt set three()" unless $foo->three();

Class::ObjectTemplate is a utility class to assist in the building of other Object Oriented Perl classes.

It was described in detail in the OReilly book, "Advanced Perl Programming" by Sriram Srinivasam.

<<less
Download (0.006MB)
Added: 2006-10-05 License: Perl Artistic License Price:
1115 downloads
Class::Container 0.12

Class::Container 0.12


Class::Container is a Perl module with Glues object frameworks together transparently. more>>
Class::Container is a Perl module with Glues object frameworks together transparently.

SYNOPSIS

package Car;
use Class::Container;
@ISA = qw(Class::Container);

__PACKAGE__->valid_params
(
paint => {default => burgundy},
style => {default => coupe},
windshield => {isa => Glass},
radio => {isa => Audio::Device},
);

__PACKAGE__->contained_objects
(
windshield => Glass::Shatterproof,
wheel => { class => Vehicle::Wheel,
delayed => 1 },
radio => Audio::MP3,
);

sub new {
my $package = shift;

# windshield and radio objects are created automatically by
# SUPER::new()
my $self = $package->SUPER::new(@_);

$self->{right_wheel} = $self->create_delayed_object(wheel);
... do any more initialization here ...
return $self;
}

This class facilitates building frameworks of several classes that inter-operate. It was first designed and built for HTML::Mason, in which the Compiler, Lexer, Interpreter, Resolver, Component, Buffer, and several other objects must create each other transparently, passing the appropriate parameters to the right class, possibly substituting other subclasses for any of these objects.

The main features of Class::Container are:

Explicit declaration of containment relationships (aggregation, factory creation, etc.)
Declaration of constructor parameters accepted by each member in a class framework
Transparent passing of constructor parameters to the class that needs them
Ability to create one (automatic) or many (manual) contained objects automatically and transparently

<<less
Download (0.019MB)
Added: 2006-10-06 License: Perl Artistic License Price:
1113 downloads
Class::DataStore 0.07

Class::DataStore 0.07


Class::DataStore is a Perl module for generic OO data storage/retrieval. more>>
Class::DataStore is a Perl module for generic OO data storage/retrieval.

SYNOPSIS

my %values = ( one => 1, two => 2 );
my $store = Class::DataStore->new( %values );

# using get/set methods
$store->set( three, 3 );
my $three = $store->get( three );

# using AUTOLOAD method
$store->four( 4 );
my $four = $store->four;
my @four = $store->four; # returns a list

my $exists = $store->exists( three ); # $exists = 1
my $data_hashref = $store->dump;
$store->clear;

Class::DataStore implements a simple storage system for object data. This data can be accessed via get/set methods and AUTOLOAD. AUTOLOAD calls are not added to the symbol table, so using get/set will be faster. Using AUTOLOAD also means that you will not be able to store data with a key that is already used by a instance method, such as "get" or "exists".
This module was written originally as part of a website framework that was used for the Democratic National Committee website in 2004. Some of the implementations here, such as get() optionally returning a list if called in array context, reflect the way this module was originally used for building web applications.

Class::DataStore is most useful when subclassed. To preserve the AUTOLOAD functionality, be sure to add the following when setting up the subclass:

use base Class::DataStore;
*AUTOLOAD = &Class::DataStore::AUTOLOAD;
This module is also a useful add-on for modules that need quick and simple data storage, e.g. to store configuration data:
$self->{_config} = Class::Datastore->new( $config_data );
sub config { return $_[0]->{_config}; }
my $server = $self->config->server;
my $sender = $self->config->get( sender );

<<less
Download (0.004MB)
Added: 2006-10-06 License: Perl Artistic License Price:
1113 downloads
Class::Multimethods::Pure 0.13

Class::Multimethods::Pure 0.13


Class::Multimethods::Pure is a Perl module that contains a method-ordered multimethod dispatch. more>>
Class::Multimethods::Pure is a Perl module that contains a method-ordered multimethod dispatch.

SYNOPSIS

use Class::Multimethods::Pure;

package A;
sub magic { rand() > 0.5 }
package B;
use base A;
package C;
use base A;

BEGIN {
multi foo => (A, A) => sub {
"Generic catch-all";
};

multi foo => (A, B) => sub {
"More specific";
};

multi foo => (subtype(A, sub { $_[0]->magic }), A) => sub {
"This gets called half the time instead of catch-all";
};

multi foo => (any(B, C), A) => sub {
"Accepts B or C as the first argument, but not A"
};
}

<<less
Download (0.015MB)
Added: 2007-07-05 License: Perl Artistic License Price:
843 downloads
Secleted [ 0 ] software to compare
  • Page: 1 of 5
  • 1
  • 2
  • 3
  • 4
  • 5