Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 29.545.423 Times

Class::Meta 0.53

  Date Added: February 10, 2010  |  Visits: 687

Class::Meta

Report Broken Link
Printer Friendly Version


Product Homepage
Download (73 downloads)



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..

Requirements: No special requirements
Platforms: Linux
Keyword: Class Classmeta Data Introspection Libraries Myapp Name Print Programming Thingy
Users rating: 0/10

License: Freeware Size: 61.44 KB
USER REVIEWS
More Reviews or Write Review


CLASS::META RELATED
Libraries  -  VCS 0.14
VCS project is a Perl library for generic Version Control System access in Perl. SYNOPSIS use VCS; $file = VCS::File->new($ARGV[0]); print $file->url, ":n"; for $version ($file->versions) { print $version->version, was checked in by ,...
21.5 KB  
Libraries  -  libbsl 0.9.1
libbsl (Basic System Library) is a powerful, easy to use and fully thread safe C++ template class library for frequently recurring (machine/OS oriented) programming problems. All fundamental objects in libbsl are freely copyable and shareable...
1.04 MB  
Business  -  SSuite Office - MonoBase 2.0.0.3
Features Available: - Create unlimited databases with unlimited tables, fields, and rows - Access any ODBC compatible database of any size, from 1 Kilobyte to 1 Terabyte - Filter tables instantly - Run SQL statements with the SQL query engine -...
9.32 MB  
Business  -  TS Client 1.1.1
TS Client is a multi-user desktop application to register data of clients like name, address, contact details, prescriptions and simple invoicing and payment requirements.The program is developed in 100% pure Java.It runs right out of the box.
4.74 MB  
Libraries  -  ViennaData 1.0.1
ViennaData is a C++ library that allows to separate intrinsic properties of a class from data associated to objects of that class. This allows to write code that is much more reusable than traditional designs.
517.54 KB  
Programming  -  libbsl 0.9.1
libbsl (Basic System Library) is a powerful, easy to use and fully thread safe C++ template class library for frequently recurring (machine/OS oriented) programming problems. All fundamental objects in libbsl are freely copyable and shareable...
2.6 MB  
Libraries  -  Class::Meta::Declare 0.04
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...
15.36 KB  
Libraries  -  DBIx::Class::LibXMLdoc 0.03
DBIx::Class::LibXMLdoc is a Perl module to create an adjunct "Doc" accessor of a columns data which is automatically parsed into a LibXML documentElement (alpha-software). SYNOPSIS package My::DB::thingy; __PACKAGE__->load_components(qw/...
5.12 KB  
Libraries  -  SOAP::Data::ComplexType 0.041
SOAP::Data::ComplexType is an abstract class for creating and handling complex SOAP::Data objects. SYNOPSIS package My::SOAP::Data::ComplexType::Foo; use strict; use warnings; use SOAP::Data::ComplexType; use vars qw(@ISA); @ISA =...
13.31 KB  
Libraries  -  Class::DBI::Plugin::FilterOnClick 1.0
Class::DBI::Plugin::FilterOnClick is a Perl module to generate browsable and searchable HTML Tables using FilterOnClick in conjunction with Class::DBI. SYNOPSIS # Inside of your sub-class of Class::DBI add these lines: use...
24.58 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and...
327.68 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB  
Libraries  -  App::SimpleScan::Substitution::Line 2.02
App::SimpleScan::Substitution::Line is a line with optional fixed variable values. SYNOPSIS my $line = App::SimpleScan::Substitution::Line->new(" this "); # Use only this value when substituting " ". $line->fix(substituite =>...
54.27 KB