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

Class::Std::Storable 0.0.1

  Date Added: October 17, 2010  |  Visits: 663

Class::Std::Storable

Report Broken Link
Printer Friendly Version


Product Homepage
Download (70 downloads)

Class::Std::Storable is a Perl module to support for creating serializable "inside-out" classes. SYNOPSIS In general, use this class exactly as you would Class::Std. package Ice::Cream; use Class::Std::Storable; { my %name_of :ATTR( :get :set ); my %flavor_of :ATTR( :get :set ); } package main; my $object = Ice::Cream->new; $object->set_name("Vanilla Bean"); $object->set_flavor("vanilla"); But now, you may also serialize the object with Storable. use Storable; my $serialized = Storable::freeze($object); #store to a file, database, or wherever, and retrieve later. my $clone = Storable::thaw($serialized); Class::Std introduced the "inside-out" model for classes (perldoc Class::Std for details). Among its salient features is complete encapsulation; that is, an objects data may only be accessed via its methods, unlike the usual hashref model that permits direct access by any code whatsoever. However, the drawback of complete encapsulation is that normal mechanisms for serialization wont work, as they rely on direct access to an objects attributes. This class provides the class-building functionality from Class::Std, and in addition provides an interface to allow Storable to freeze and thaw any declared attributes of this class and any superclasses that were built via Class::Std::Storable. However, in order to let Storable save attributes and construct the object, it is necessary to expose the attributes of the class to the world. Thus, any code could use the same interface that Storable does to get a copy of object attributes and create new objects with arbitrary attributes without going through the constructor. While the interface CANT be used to replace the existing attributes of an object, it COULD be used to create an arbitrarily mutated clone of an object without going through its methods. Also, if attributes are themselves references, then the objects to which they refer can be obtained and modified. As true encapsulation is one of the major features of Class::Std, this would be a good reason NOT to use this class. But this sacrifice is required to provide serialization. You must choose which is more important for your purposes, serialization or complete encapsulation. Consider also that while bypassing the class methods is possible to a limited degree with Class::Std::Storable, doing so is much more complicated than just using the methods, so use of this class still discourages casual violations of encapsulation..

Requirements: No special requirements
Platforms: Linux
Keyword: Attributes Class Classstdstorable Encapsulation Inside-out Libraries Object Perl Module Programming Storable
Users rating: 0/10

License: Freeware Size: 8.19 KB
CLASS::STD::STORABLE RELATED
Libraries  -  CGI::Out 2006.0215
CGI::Out is a Perl module to buffer output when building CGI programs. SYNOPSIS use CGI; use CGI::Out; $query = new CGI; savequery $query; # to reconstruct input $CGI::Out::mailto = fred; # override default of $ out...
4.1 KB  
Libraries  -  XML::XMetaL 0.52
XML::XMetaL is a Perl module with dispatch class for XML::XMetaL development framework. The XML::XMetaL class is a dispatcher for XMetaL customization handlers. XML:XMetaL objects are singletons. There can be only one XML::XMetaL object...
24.58 KB  
Libraries  -  Object::Realize::Later 0.16
Object::Realize::Later is a Perl module with delayed creation of objects. SYNOPSIS package MyLazyObject; use Object::Realize::Later becomes => MyRealObject, realize => load; The Object::Realize::Later class helps with implementing...
10.24 KB  
Libraries  -  Class::InsideOut::Manual::About 1.03
Class::InsideOut::Manual::About is a guide to this and other implementations of the inside-out technique. This manual provides an overview of the inside-out technique and its application within Class::InsideOut and other modules. It also...
48.13 KB  
Libraries  -  Class::InsideOut 1.02
Class::InsideOut is a Perl module with a safe, simple inside-out object construction kit. SYNOPSIS package My::Class; use Class::InsideOut qw( public private register id ); public name => my %name; # accessor: name() private age => my...
48.13 KB  
Libraries  -  Class::Std::Utils 0.0.2
Class::Std::Utils is a Perl module for utility subroutines for building "inside-out" objects. SYNOPSIS use Class::Std::Utils; # Constructor for anonymous scalars... my $new_object = bless anon_scalar(), $class; # Convert an object...
5.12 KB  
Libraries  -  Class::Std 0.0.8
Class::Std is a Perl module to support for creating standard "inside-out" classes. SYNOPSIS package MyClass; use Class::Std; # Create storage for object attributes... my %name : ATTR; my %rank : ATTR; my %snum : ATTR; my %public_data :...
30.72 KB  
Libraries  -  Class::Declare::Attributes 0.04
Class::Declare::Attributes is a Perl module with Class::Declare method types using Perl attributes. SYNOPSIS package My::Class; use 5.006; use strict; use warnings; use base qw( Class::Declare::Attributes ); # declare the...
21.5 KB  
Libraries  -  Object::Relation::Meta::Class::Schema 0.1.0
Object::Relation::Meta::Class::Schema is a Perl module for Object::Relation database store builder. This module is provides metadata for all Object::Relation classes while building a storage schema. Loading Object::Relation::Schema causes it to...
24.58 KB  
Libraries  -  Games::Object 0.11
Games::Object is a Perl module to provide a base class for game objects. SYNOPSIS package MyGameObject; use Games::Object; use vars qw(@ISA); @ISA = qw(Games::Object); sub new { # Create object my $proto = shift; my $class =...
84.99 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  -  wolfSSL 3.12.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...
2.73 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