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 32.389.160 Times

Class::Meta::Declare 0.04

  Date Added: May 23, 2010  |  Visits: 800


Report Broken Link
Printer Friendly Version

Product Homepage
Download (71 downloads)

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

Requirements: No special requirements
Platforms: Linux
Keyword: Class Classmetadeclare In Favor Of Libraries Methods Module Myapp Name Perl Perl Module Print Programming Type
Users rating: 0/10

License: Freeware Size: 15.36 KB
More Reviews or Write Review

Modules  -  Tagnode 4.7.x-1.x-de
This module is deprecated in favor of CCK's nodereference module, the node relativity module, and/or any future node relations APIs.Permits node-to-node associations, using Drupal's taxonomy system. Facilitates 1-to-many or many-to-many...
20.48 KB  
Modules  -  CCKase tracker 6.x-1.x-de
The development of this module will stop in favor of CCK comments module, as it has a similar functionality, with no dependencies.The difference in CCKasetracker and CCK comments, is that CCKasetracker doesn't use the node revisions table, however...
10 KB  
Modules  -  User-to-user Recommendation 6.x-1.1
IMPORTANT:This module is temporarily abandoned in favor of Browsing History Recommender module. Please refer to #509858: migrating to Browsing History Recommender. Future release of the module would take user relations from social networking...
10 KB  
Modules  -  Taxonomy Navigation 5.x-1.2
This module has been abandoned in favor of Taxonomy Menu which does the same thing with more features.It adds taxonomy terms to the menu system. This module depends on Pathauto if you are willing to build a proper hierarchy menu structure out of...
10 KB  
Modules  -  Nodereference popup 5.x-1.0-beta1
Discontinued in favor of nodereference_views_select.Just another nodereference widget. Inspired on nodereference_explorer but by now more similar to nodereference_views_select.Features- Open a popup window with the view embedded- Cross-browser-...
10 KB  
Games  -  Banana Gun Two 1.3
After a long peaceful life on Banana Planet, where the Banana People lived in harmony with their *pet* monkeys, things start to change; monkeys start acting differently... and in a way NOT in favor of the Banana people! The only person who...
217 MB  
Health & Fitness  -  Gym Bag Notebook
Track your weight lifting success with Gym Bag Notebook, the easiest-to-use workout tracking app for Windows Phone. *Update fixes: - Sorted Workouts Corrected - Removed Reminder system in favor of sound notification -...
1024 KB  
Libraries  -  Test::Stochastic 0.03
Test::Stochastic is a Perl module to check probabilities of randomized methods. SYNOPSIS use Test::Stochastic qw(stochastic_ok); stochastic_ok sub { ...random sub...}, {a => 0.4, b => 0.6}; stochastic_ok {a => 0.4, b => 0.6}, sub { ...random...
4.1 KB  
Libraries  -  Apache::Wyrd 0.94
Apache::Wyrd is a Perl module for HTML embeddable perl objects under mod_perl. Apache::Wyrd is the core module in a collection of interoperating modules that allow the rapid object-oriented development of web sites in Apaches mod_perl...
174.08 KB  
Libraries  -  Perl6::Classes 0.22
Perl6::Classes project contains first class classes in Perl 5. SYNOPSIS use Perl6::Classes; class Composer { submethod BUILD { print "Giving birth to a new composern" } method compose { print "Writing some music...n" } } class...
7.17 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  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 3.15.3
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
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