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

Class::Meta::Declare 0.04

  Date Added: May 23, 2010  |  Visits: 781


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
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  
Business  -  Yamysqlfront rev-109
this project is discontinued in favor of, its plattform independant successor. yamysqlfront is a graphical mysql client to administer mysql replacement of the famous freeware mysqlfront.
317.44 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  
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, 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  -  wolfSSL 3.13.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