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

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

Serving Software Downloads in 956 Categories, Downloaded 50.218.944 Times

Class::Meta::Declare 0.04

  Date Added: May 23, 2010  |  Visits: 1.089

Class::Meta::Declare

Report Broken Link
Printer Friendly Version


Product Homepage
Download (88 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
USER REVIEWS
More Reviews or Write Review


CLASS::META::DECLARE RELATED
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  -  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  -  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  
Libraries  -  Set::Hash 0.01
Set::Hash is a Perl module with hashes as objects with lots of handy methods (including set comparisons) and support for method chaining. SYNOPSIS use Set::Hash; my $sh1 = Set::Hash->new(name=>"dan",age=>33); my $sh2 =...
7.17 KB  
Modules  -  Free Of Charge Payment Module 1.0
This payment module, if enabled from the admin, gives people an option of having a "free" payment of their purchase. What the module does is check the shopping cart's total.If the grand total is anything other then 0.00, the module will...
 
Modules  -  Bank of America eStores Module 2.3
Apparently, credit cards would AUTOMATICALLY be charged with this feature enabled, even with INVALID CVV numbers, expiration dates, etc. I have changed the default setting to FALSE (disabled). After carefully reading the documentation, this should...
 
Libraries  -  pysnort 0.91
pysnort is a set of libraries written in python and for python. The main goal is to provide developers with a fast, easy to use, powerful and reliable program interface. Up to now theres only a mysql log interface. But this interface is powerful...
24.58 KB  
Libraries  -  Smieciuch++ 0.6.4 RC3
Smieciuch library is a precise (in case of C++) or nearly precise (in case of plain C) tracing garbage collector. Tracing means that GC scans memory for active pointers and traces all paths (consisting of possibly multiple pointer indirections)...
 
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
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 4.0.0
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