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

Class::Generate 1.09

  Date Added: January 13, 2010  |  Visits: 1.130

Class::Generate

Report Broken Link
Printer Friendly Version


Product Homepage
Download (96 downloads)



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

Requirements: No special requirements
Platforms: Linux
Keyword: Array Class Classgenerate Libraries Member Perl Perl Module Programming Value
Users rating: 0/10

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


CLASS::GENERATE RELATED
Libraries  -  Alien Perl module 0.91
Alien Perl module package contains external libraries wrapped up for your viewing pleasure! SYNOPSIS perldoc Alien; Alien is a package that exists just to hold together an idea, the idea of Alien:: packages, so there is no code here, just...
10.24 KB  
Libraries  -  Class::IntrospectionMethods 1.003
Class::IntrospectionMethods is a Perl module that creates methods with introspection. SYNOPSIS use Class::IntrospectionMethods qw/make_methods/; make_methods ( parent, global_catalog => { name => metacat, list => [ [qw/foo/] =>...
31.74 KB  
Libraries  -  Class::DataStore 0.07
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(...
4.1 KB  
Libraries  -  Class::Container 0.12
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 =>...
19.46 KB  
Libraries  -  OpenGeoDB Perl module 0.4
OpenGeDB Perl module is a module to access the OpenGeoDB database and calculate all ZIP codes in a certain radius..
3.07 KB  
Libraries  -  Class::Bits 0.05
Class::Bits is a Perl module with class wrappers around bit vectors. SYNOPSIS package MyClass; use Class::Bits; make_bits( a => 4, # 0..15 b => 1, # 0..1 c => 1, # 0..1 d => 2, # 0..3 e => s4 # -8..7 f => s1 # -1..0 ); package;...
4.1 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  -  Class::ParmList 1.05
Class::ParmList is a Perl module with methods for processing named parameter lists. SYNOPSIS use Class::ParmList qw(simple_parms parse_parms); $thingy->some_method({ -bgcolor => #ff0000, -textcolor => #000000 }); sub some_method { my...
16.38 KB  
Libraries  -  Class::Observable 1.04
Class::Observable is a Perl module that allows other classes and objects to respond to events in yours. SYNOPSIS # Define an observable class package My::Object; use base qw( Class::Observable ); # Tell all classes/objects observing this...
10.24 KB  
Libraries  -  Class::CGI 0.20
Class::CGI is a Perl module to fetch objects from your CGI object. SYNOPSIS use Class::CGI handlers => { customer_id => My::Customer::Handler }; my $cgi = Class::CGI->new; my $customer = $cgi->param(customer_id); my $name =...
17.41 KB  
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