perl objects
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 6350
Perl OS 4
Perl OS is a program written in Perl/Tk, designed to look like a simple operating system. more>>
Perl OS is a program written in the Perl programming language combined with the Perl module Tk.
Perl OS was created to make an easy interface to run Perl/Tk programs. It was also created to be an easy working environment complete with a text editor, paint program, and more.
The program comes with several programs, along with a utility to add many more which can be found on the Internet.
From the outside, Perl OS looks like a simple operating system. But inside, it is a powerful system for working with Perl and Tk.
For more details please visit the Perl OS home page:
http://perlos.sourceforge.net/
<<lessPerl OS was created to make an easy interface to run Perl/Tk programs. It was also created to be an easy working environment complete with a text editor, paint program, and more.
The program comes with several programs, along with a utility to add many more which can be found on the Internet.
From the outside, Perl OS looks like a simple operating system. But inside, it is a powerful system for working with Perl and Tk.
For more details please visit the Perl OS home page:
http://perlos.sourceforge.net/
Download (0.14MB)
Added: 2007-08-04 License: GPL v3 Price:
812 downloads
HTML Objects 1.2.4
HTML Objects is a Perl module library for turning HTML tags into Perl objects. more>>
HTML Objects is a Perl module library for turning HTML tags into Perl objects. HTML Objects allows Web pages to be manipulated as a data structure rather than text.
Once manipulation is done, the entire page is generated via depth-first recursion.
<<lessOnce manipulation is done, the entire page is generated via depth-first recursion.
Download (0.025MB)
Added: 2006-05-09 License: GPL (GNU General Public License) Price:
1263 downloads
PObject 0.90
PObject is a base class for perl objects, takes the irritation out of creating properties for objects. more>>
PObject is a base class for perl objects, takes the irritation out of creating properties for objects. Allows quick creation of attributes and easy inheritance. I have stopped developing this class in favor of Class::Accessor, please use that instead.
To install, the good old method:
perl Makefile.PL
make
make test
make install
Enhancements:
- Changed handling to be case sensitive for object methods. Also added support for package defaults and allowing changes to them. **NOTE any modules made with PObject < 0.90 WILL NEED TO BE CHANGED. The AUTOFIELDS hash needs to be updated and all method
<<lessTo install, the good old method:
perl Makefile.PL
make
make test
make install
Enhancements:
- Changed handling to be case sensitive for object methods. Also added support for package defaults and allowing changes to them. **NOTE any modules made with PObject < 0.90 WILL NEED TO BE CHANGED. The AUTOFIELDS hash needs to be updated and all method
Download (0.004MB)
Added: 2006-07-17 License: GPL (GNU General Public License) Price:
1194 downloads
Perl Object Environment 0.9999
Perl Object Environment is a Perl multitasking framework that lends itself to networking software. more>>
POE (Perl Object Environment) parcels out execution time among one or more tasks, called sessions. Sessions multitask through cooperation (at least until Perls threads become mainstream). That is, each session returns execution to POE as quickly as possible so it can parcel out time to the next.
POE includes a high-level component architecture. Components are modular, reusable pieces of programs. They perform common, often tedious tasks so programmers can work on more interesting things.
Several POE components have been written to handle client, server, and peer networking tasks. Because of them, POE has become a convenient and quick way to write multitasking network applications.
Anyone can write and publish POE components. The CPAN contains a [steadily growing list] of them. The POE Components List includes ones that havent been uploaded to the CPAN yet.
POE provides medium- and low-level concurrency functions. Components use them to perform their tasks. The functions are also available to programmers who prefer to avoid the overhead of components at the expense of writing more code. Components and custom sessions coexist because they all use the same basic functions.
POE supports graphical toolkits such as Tk and Gtk. It is the only Perl programming framework that does this. It also supports Curses, HTTP, and other user interfaces. POE programs can present multiple user interfaces at once.
Enhancements:
- A number of stability and performance fixes were done, including making the tests less prone to race conditions, improving the installation process, eliminating known resource leaks, and reducing CPU use when combined with Tk.
<<lessPOE includes a high-level component architecture. Components are modular, reusable pieces of programs. They perform common, often tedious tasks so programmers can work on more interesting things.
Several POE components have been written to handle client, server, and peer networking tasks. Because of them, POE has become a convenient and quick way to write multitasking network applications.
Anyone can write and publish POE components. The CPAN contains a [steadily growing list] of them. The POE Components List includes ones that havent been uploaded to the CPAN yet.
POE provides medium- and low-level concurrency functions. Components use them to perform their tasks. The functions are also available to programmers who prefer to avoid the overhead of components at the expense of writing more code. Components and custom sessions coexist because they all use the same basic functions.
POE supports graphical toolkits such as Tk and Gtk. It is the only Perl programming framework that does this. It also supports Curses, HTTP, and other user interfaces. POE programs can present multiple user interfaces at once.
Enhancements:
- A number of stability and performance fixes were done, including making the tests less prone to race conditions, improving the installation process, eliminating known resource leaks, and reducing CPU use when combined with Tk.
Download (0.35MB)
Added: 2007-08-05 License: Perl Artistic License Price:
812 downloads
Perl OpenID 1.1
Perl OpenID is a perl module for verifying OpenID identities. more>>
Perl OpenID is a perl module for verifying OpenID identities.
Main features:
- asy-to-use API
- Does not depend on underlying web framework
- Extensive documentaion
- Ready-to-use store implementation
- Test suite
- Licensed under the LGPL
Enhancements:
- This release contains a tested, documented library with support for OpenID extensions and Yadis.
- There are examples for both the consumer and server.
<<lessMain features:
- asy-to-use API
- Does not depend on underlying web framework
- Extensive documentaion
- Ready-to-use store implementation
- Test suite
- Licensed under the LGPL
Enhancements:
- This release contains a tested, documented library with support for OpenID extensions and Yadis.
- There are examples for both the consumer and server.
Download (0.057MB)
Added: 2006-06-15 License: LGPL (GNU Lesser General Public License) Price:
1227 downloads
Ace::Object 1.89
Ace::Object is a Perl module to manipulate Ace Data Objects. more>>
Ace::Object is a Perl module to manipulate Ace Data Objects.
SYNOPSIS
# open database connection and get an object
use Ace;
$db = Ace->connect(-host => beta.crbm.cnrs-mop.fr,
-port => 20000100);
$sequence = $db->fetch(Sequence => D12345);
# Inspect the object
$r = $sequence->at(Visible.Overlap_Right);
@row = $sequence->row;
@col = $sequence->col;
@tags = $sequence->tags;
# Explore object substructure
@more_tags = $sequence->at(Visible)->tags;
@col = $sequence->at("Visible.$more_tags[1]")->col;
# Follow a pointer into database
$r = $sequence->at(Visible.Overlap_Right)->fetch;
$next = $r->at(Visible.Overlap_left)->fetch;
# Classy way to do the same thing
$r = $sequence->Overlap_right;
$next = $sequence->Overlap_left;
# Pretty-print object
print $sequence->asString;
print $sequence->asTabs;
print $sequence->asHTML;
# Update object
$sequence->replace(Visible.Overlap_Right,$r,M55555);
$sequence->add(Visible.Homology,GR91198);
$sequence->delete(Source.Clone,MBR122);
$sequence->commit();
# Rollback changes
$sequence->rollback()
# Get errors
print $sequence->error;
Ace::Object is the base class for objects returned from ACEDB databases. Currently there is only one type of Ace::Object, but this may change in the future to support more interesting object-specific behaviors.
Using the Ace::Object interface, you can explore the internal structure of an Ace::Object, retrieve its content, and convert it into various types of text representation. You can also fetch a representation of any object as a GIF image.
If you have write access to the databases, add new data to an object, replace existing data, or kill it entirely. You can also create a new object de novo and write it into the database.
<<lessSYNOPSIS
# open database connection and get an object
use Ace;
$db = Ace->connect(-host => beta.crbm.cnrs-mop.fr,
-port => 20000100);
$sequence = $db->fetch(Sequence => D12345);
# Inspect the object
$r = $sequence->at(Visible.Overlap_Right);
@row = $sequence->row;
@col = $sequence->col;
@tags = $sequence->tags;
# Explore object substructure
@more_tags = $sequence->at(Visible)->tags;
@col = $sequence->at("Visible.$more_tags[1]")->col;
# Follow a pointer into database
$r = $sequence->at(Visible.Overlap_Right)->fetch;
$next = $r->at(Visible.Overlap_left)->fetch;
# Classy way to do the same thing
$r = $sequence->Overlap_right;
$next = $sequence->Overlap_left;
# Pretty-print object
print $sequence->asString;
print $sequence->asTabs;
print $sequence->asHTML;
# Update object
$sequence->replace(Visible.Overlap_Right,$r,M55555);
$sequence->add(Visible.Homology,GR91198);
$sequence->delete(Source.Clone,MBR122);
$sequence->commit();
# Rollback changes
$sequence->rollback()
# Get errors
print $sequence->error;
Ace::Object is the base class for objects returned from ACEDB databases. Currently there is only one type of Ace::Object, but this may change in the future to support more interesting object-specific behaviors.
Using the Ace::Object interface, you can explore the internal structure of an Ace::Object, retrieve its content, and convert it into various types of text representation. You can also fetch a representation of any object as a GIF image.
If you have write access to the databases, add new data to an object, replace existing data, or kill it entirely. You can also create a new object de novo and write it into the database.
Download (0.29MB)
Added: 2006-10-12 License: Perl Artistic License Price:
1108 downloads
Rose::HTML::Objects 0.547
Rose::HTML::Objects is a Perl object-oriented interfaces for HTML. more>>
Rose::HTML::Objects is a Perl object-oriented interfaces for HTML.
SYNOPSIS
use Rose::HTML::Form;
$form = Rose::HTML::Form->new(action => /foo,
method => post);
$form->add_fields
(
name => { type => text, size => 20, required => 1 },
height => { type => text, size => 5, maxlength => 5 },
bday => { type => datetime },
);
$form->params(name => John, height => 6ft, bday => 01/24/1984);
$form->init_fields();
$bday = $form->field(bday)->internal_value; # DateTime object
print $bday->strftime(%A); # Tuesday
print $form->field(bday)->html;
The Rose::HTML::Object::* family of classes represent HTML tags, or groups of tags. These objects allow HTML to be arbitrarily manipulated, then serialized to actual HTML (or XHTML). Currently, the process only works in one direction. Objects cannot be constructed from their serialized representations. In practice, given the purpose of these modules, this is not an important limitation.
Any HTML tag can theoretically be represented by a Rose::HTML::Object-derived class, but this family of modules was originally motivated by a desire to simplify the use of HTML forms.
The form/field object interfaces have been heavily abstracted to allow for input and output filtering, inflation/deflation of values, and compound fields (fields that contain other fields). The classes are also designed to be subclassed. The creation of custom form and field subclasses is really the "big win" for these modules.
There is also a simple image tag class which is useful for auto-populating the width and height attributes of img tags. Future releases may include object representations of other HTML tags. Contributions are welcome.
<<lessSYNOPSIS
use Rose::HTML::Form;
$form = Rose::HTML::Form->new(action => /foo,
method => post);
$form->add_fields
(
name => { type => text, size => 20, required => 1 },
height => { type => text, size => 5, maxlength => 5 },
bday => { type => datetime },
);
$form->params(name => John, height => 6ft, bday => 01/24/1984);
$form->init_fields();
$bday = $form->field(bday)->internal_value; # DateTime object
print $bday->strftime(%A); # Tuesday
print $form->field(bday)->html;
The Rose::HTML::Object::* family of classes represent HTML tags, or groups of tags. These objects allow HTML to be arbitrarily manipulated, then serialized to actual HTML (or XHTML). Currently, the process only works in one direction. Objects cannot be constructed from their serialized representations. In practice, given the purpose of these modules, this is not an important limitation.
Any HTML tag can theoretically be represented by a Rose::HTML::Object-derived class, but this family of modules was originally motivated by a desire to simplify the use of HTML forms.
The form/field object interfaces have been heavily abstracted to allow for input and output filtering, inflation/deflation of values, and compound fields (fields that contain other fields). The classes are also designed to be subclassed. The creation of custom form and field subclasses is really the "big win" for these modules.
There is also a simple image tag class which is useful for auto-populating the width and height attributes of img tags. Future releases may include object representations of other HTML tags. Contributions are welcome.
Download (0.13MB)
Added: 2007-03-26 License: Perl Artistic License Price:
942 downloads
JOAP::Server::Object 0.01
JOAP::Server::Object is a base class for Things Servable By JOAP Servers. more>>
JOAP::Server::Object is a base class for Things Servable By JOAP Servers.
ABSTRACT
This verbosely-named OO package -- sorry about that -- is the base class for object servers, classes, and instances inside a JOAP server. It is probably not such a hunky-dory idea to inherit from this class itself -- use JOAP::Server::Class or JOAP::Server instead. However, it does lay out the framework for how those classes works -- thus, this POD.
When it comes down to it, JOAP is about defining objects and making their attributes and methods available across the Jabber network. This class does the meat of that.
(Unfortunate note: this is a Perl class for defining JOAP objects. It uses Perl attributes to make JOAP attributes, and Perl methods to make JOAP methods. The terminology is confusing, so Ill try and use the prefixes Perl and JOAP where possible.)
There are three interfaces for this module.
Container
This interface consists of a constructor and a set of 8 "handler" methods, which are appropriate for folks who want to create JOAP servers that can serve Perl classes (JOAP::Server is one piece of software that uses this interface).
Simple Subclass
This interface is a set of rules for defining data and methods in a Perl module that is a subclass of JOAP::Server::Object, so that it can be seen by the world as a JOAP class.
This interface is documented in JOAP::Server and JOAP::Server::Class for object servers and classes, respectively. Its repeated here for completeness.
Complex Subclass
This interface is a whole bunch of itty-bitty methods that subclasses can overload if they want to subvert the standard way of defining a JOAP server class in Perl. Itd be appropriate for, say, creating gateways to other object systems, or having more robust and scalable systems written in Perl than the one implemented here.
The complex subclass interface is still in flux and remains undocumented for now.
<<lessABSTRACT
This verbosely-named OO package -- sorry about that -- is the base class for object servers, classes, and instances inside a JOAP server. It is probably not such a hunky-dory idea to inherit from this class itself -- use JOAP::Server::Class or JOAP::Server instead. However, it does lay out the framework for how those classes works -- thus, this POD.
When it comes down to it, JOAP is about defining objects and making their attributes and methods available across the Jabber network. This class does the meat of that.
(Unfortunate note: this is a Perl class for defining JOAP objects. It uses Perl attributes to make JOAP attributes, and Perl methods to make JOAP methods. The terminology is confusing, so Ill try and use the prefixes Perl and JOAP where possible.)
There are three interfaces for this module.
Container
This interface consists of a constructor and a set of 8 "handler" methods, which are appropriate for folks who want to create JOAP servers that can serve Perl classes (JOAP::Server is one piece of software that uses this interface).
Simple Subclass
This interface is a set of rules for defining data and methods in a Perl module that is a subclass of JOAP::Server::Object, so that it can be seen by the world as a JOAP class.
This interface is documented in JOAP::Server and JOAP::Server::Class for object servers and classes, respectively. Its repeated here for completeness.
Complex Subclass
This interface is a whole bunch of itty-bitty methods that subclasses can overload if they want to subvert the standard way of defining a JOAP server class in Perl. Itd be appropriate for, say, creating gateways to other object systems, or having more robust and scalable systems written in Perl than the one implemented here.
The complex subclass interface is still in flux and remains undocumented for now.
Download (0.12MB)
Added: 2007-03-05 License: Perl Artistic License Price:
965 downloads
Games::Object 0.11
Games::Object is a Perl module to provide a base class for game objects. more>>
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 = ref($proto) || $proto;
my $self = $class->SUPER::new(@_);
bless $self, $class;
# Add attributes
$self->new_attr(-name => "hit_points",
-type => int,
-value => 20,
-tend_to_rate => 1);
$self->new_attr(-name => "strength",
-type => int,
-value => 12,
-minimum => 3,
-maximum => 18);
...
return $self;
}
package MyObjectManager;
use Games::Object::Manager;
use vars qw(@ISA);
@ISA = qw(Games::Object::Manager);
sub new {
my $proto = shift;
my $class = ref($proto) || $proto;
my $self = $class->SUPER::new( , @_);
bless $self, $class;
...
return $self;
}
my $world = new MyObjectManager;
my $object = new MyGameObject;
$world->add($object);
ABSTRACT
The purpose of this module is to allow a programmer to write a game in Perl easily by providing a basic framework in the form of a module that can be either subclassed to a module of your own or used directly as its own object class. The most important items in this framework are:
Attributes
You can define arbitrary attributes on objects with rules on how they may be updated, as well as set up automatic update of attributes whenever the objects process() method is invoked. For example, you could set an attribute on an object such that:
It ranges from 0 to 100.
Internally it tracks fractional changes to the value but accessing the attribute will always round the result to an integer.
It will automatically tend towards the maximum by 1 every time process() is called on the object.
A method in your subclass will be invoked automatically if the value falls to 0.
This is just one example of what you can do with attributes.
Flags
You can define any number of arbitrarily-named flags on an object. A flag is a little like a boolean attribute, in that it can have a value of either true or false. Like attributes, flags can be created independently on different objects. No "global" flag list is imposed.
Load/Save functionality
Basic functionality is provided for saving data from an object to a file, and for loading data back into an object. This handles the bulk of load game / save game processing, freeing the programmer to worry about the mechanics of the game itself.
The load functionality can also be used to create objects from object templates. An object template would be a save file that contains a single object.
Object Managers
New to version 0.10 of this module is object managers. An object manager is a Perl object that allows you to manage groups of related game objects. The object manager allows you to relate objects together (for example, you could define a relationship that allows certain objects to act as containers for other objects). In effect, the object manager acts as your world or universe.
Like the game object class, the manager class can be subclassed, allowing you augment its functionality. An object manager can be loaded and saved, which in turn performs a load or save of the objects being managed by it.
<<lessSYNOPSIS
package MyGameObject;
use Games::Object;
use vars qw(@ISA);
@ISA = qw(Games::Object);
sub new {
# Create object
my $proto = shift;
my $class = ref($proto) || $proto;
my $self = $class->SUPER::new(@_);
bless $self, $class;
# Add attributes
$self->new_attr(-name => "hit_points",
-type => int,
-value => 20,
-tend_to_rate => 1);
$self->new_attr(-name => "strength",
-type => int,
-value => 12,
-minimum => 3,
-maximum => 18);
...
return $self;
}
package MyObjectManager;
use Games::Object::Manager;
use vars qw(@ISA);
@ISA = qw(Games::Object::Manager);
sub new {
my $proto = shift;
my $class = ref($proto) || $proto;
my $self = $class->SUPER::new( , @_);
bless $self, $class;
...
return $self;
}
my $world = new MyObjectManager;
my $object = new MyGameObject;
$world->add($object);
ABSTRACT
The purpose of this module is to allow a programmer to write a game in Perl easily by providing a basic framework in the form of a module that can be either subclassed to a module of your own or used directly as its own object class. The most important items in this framework are:
Attributes
You can define arbitrary attributes on objects with rules on how they may be updated, as well as set up automatic update of attributes whenever the objects process() method is invoked. For example, you could set an attribute on an object such that:
It ranges from 0 to 100.
Internally it tracks fractional changes to the value but accessing the attribute will always round the result to an integer.
It will automatically tend towards the maximum by 1 every time process() is called on the object.
A method in your subclass will be invoked automatically if the value falls to 0.
This is just one example of what you can do with attributes.
Flags
You can define any number of arbitrarily-named flags on an object. A flag is a little like a boolean attribute, in that it can have a value of either true or false. Like attributes, flags can be created independently on different objects. No "global" flag list is imposed.
Load/Save functionality
Basic functionality is provided for saving data from an object to a file, and for loading data back into an object. This handles the bulk of load game / save game processing, freeing the programmer to worry about the mechanics of the game itself.
The load functionality can also be used to create objects from object templates. An object template would be a save file that contains a single object.
Object Managers
New to version 0.10 of this module is object managers. An object manager is a Perl object that allows you to manage groups of related game objects. The object manager allows you to relate objects together (for example, you could define a relationship that allows certain objects to act as containers for other objects). In effect, the object manager acts as your world or universe.
Like the game object class, the manager class can be subclassed, allowing you augment its functionality. An object manager can be loaded and saved, which in turn performs a load or save of the objects being managed by it.
Download (0.083MB)
Added: 2006-09-30 License: Perl Artistic License Price:
1119 downloads
Basset::Object 1.04
Basset::Object is a Perl module used to create objects. more>>
Basset::Object is a Perl module used to create objects.
This is my ultimate object creation toolset to date. It has roots in Mail::Bulkmail, Text::Flowchart, and the unreleased abstract object constructors that Ive tooled around with in the past.
If you want an object to be compatible with anything else Ive written, then subclass it off of here.
Of course, you dont have to use this to create subclasses, but youll run the risk of making something with an inconsistent interface vs. the rest of the system. Thatll confuse people and make them unhappy. So I recommend subclassing off of here to be consistent. Of course, you may not like these objects, but they do work well and are consistent. Consistency is very important in interface design, IMHO.
<<lessThis is my ultimate object creation toolset to date. It has roots in Mail::Bulkmail, Text::Flowchart, and the unreleased abstract object constructors that Ive tooled around with in the past.
If you want an object to be compatible with anything else Ive written, then subclass it off of here.
Of course, you dont have to use this to create subclasses, but youll run the risk of making something with an inconsistent interface vs. the rest of the system. Thatll confuse people and make them unhappy. So I recommend subclassing off of here to be consistent. Of course, you may not like these objects, but they do work well and are consistent. Consistency is very important in interface design, IMHO.
Download (0.14MB)
Added: 2007-06-20 License: GPL (GNU General Public License) Price:
856 downloads
MyCMS perl module 1.0
MyCMS perl module provides the MN::CMS Perl module used by the MyCMS. more>>
MyCMS perl module provides the MN::CMS Perl module used by the MyCMS.
MyCMS perl module contains Perl object classes to manage the data of MyCMS (such as articles, links, and images).
MN::CMS is a perl module that allows you to manage an Internet
publishing system.#
MyCMS is an extension module of MyNews.
MyCMS introduces the concept of article, author and moderator.
<<lessMyCMS perl module contains Perl object classes to manage the data of MyCMS (such as articles, links, and images).
MN::CMS is a perl module that allows you to manage an Internet
publishing system.#
MyCMS is an extension module of MyNews.
MyCMS introduces the concept of article, author and moderator.
Download (0.016MB)
Added: 2007-02-13 License: Perl Artistic License Price:
986 downloads
Perl Panel 0.9.1
Perl Panel is an X11 panel program written in Perl. more>>
PerlPanel is an attempt to build a useable, lean panel program (like the Gnome Panel or the KDE Kicker) in Perl, using the Gtk2-Perl libraries.
PerlPanel is the ideal accompaniment to a light-weight Window Manager such as OpenBox, or a desktop-drawing program like iDesk. Click here to see all three working together.
Most of PerlPanels features are provided by applets - simple widgets that each do a different job. PerlPanel currently ships with 36 different applets.
<<lessPerlPanel is the ideal accompaniment to a light-weight Window Manager such as OpenBox, or a desktop-drawing program like iDesk. Click here to see all three working together.
Most of PerlPanels features are provided by applets - simple widgets that each do a different job. PerlPanel currently ships with 36 different applets.
Download (0.34MB)
Added: 2005-04-27 License: GPL (GNU General Public License) Price:
1646 downloads
Bio::Root::Object 1.4
Bio::Root::Object is a core Perl 5 object. more>>
Bio::Root::Object is a core Perl 5 object.
SYNOPSIS
# Use this module as the root of your inheritance tree.
Object Creation
require Bio::Root::Object;
$dad = new Bio::Root::Object();
$son = new Bio::Root::Object(-name => Junior,
-parent => $dad,
-make => full);
See the new() method for a complete description of parameters. See also the USAGE section .
Bio::Root::Object attempts to encapsulate the "core" Perl5 object: What are the key data and behaviors ALL (or at least most) Perl5 objects should have?
Rationale
Use of Bio::Root::Object.pm within the Bioperl framework facilitates operational consistency across the different modules defined within the Bio:: namespace. Not all objects need to derive from Bio::Root::Object.pm. However, when generating lots of different types of potentially complex objects which should all conform to a set of basic expectations, this module may be handy.
At the very least, this module saves you from re-writing the new() method for each module you develop. It also permits consistent and robust handling of -tag => value method arguments via the Bio::Root::RootI::_rearrange() method and provides a object-oriented way handle exceptions and warnings via the Bio::Root::Root::throw() and Bio::Root::Root::warn() methods.
See the APPENDIX section for some other handy methods.
Fault-Tolerant Objects
A major motivation for this module was to promote the creation of robust, fault-tolerant Perl5 objects. The Bio::Root::Root::throw() method relies on Perls built-in eval{}/die exception mechanism to generate fatal exceptions. The data comprising an exception is managed by the Bio::Root::Err.pm module, which essentially allows the data thrown by a die() event to be wrapped into an object that can be easily examined and possibly re-thrown.
The intent here is three-fold:
1 Detailed error reporting.
Allow objects to report detailed information about the error condition (who, what, where, why, how).
2 Handle complex errors in objects.
The goal is to make it relatively painless to detect and handle the wide variety of errors possible with a complex Perl object. Perls error handling mechanism is a might clunky when it comes to handling complex errors within complex objects, but it is improving.
3 Efficient & easy exception handling.
To enable robust exception handling without incurring a significant performance penalty in the resulting code. Ideally, exception handling code should be transparent to the cpu until and unless an exception arises.
These goals may at times be at odds and we are not claiming to have achieved the perfect balance. Ultimately, we want self- sufficient object-oriented systems able to deal with their own errors. This area should improve as the module, and Perl, evolve. One possible modification might be to utilize Graham Barrs Error.pm module or Torsten Ekedahls Experimental::Exception.pm module (see "Other Exception Modules").
Technologies such as these may eventually be incorporated into future releases of Perl. The exception handling used by Bio::Root::Object.pm can be expected to change as Perls exception handling mechanism evolves.
TERMINOLOGY NOTE: In this discussion and elsewhere in this module, the terms "Exception" and "Error" are used interchangeably to mean "something unexpected occurred" either as a result of incorrect user input or faulty internal processing.
<<lessSYNOPSIS
# Use this module as the root of your inheritance tree.
Object Creation
require Bio::Root::Object;
$dad = new Bio::Root::Object();
$son = new Bio::Root::Object(-name => Junior,
-parent => $dad,
-make => full);
See the new() method for a complete description of parameters. See also the USAGE section .
Bio::Root::Object attempts to encapsulate the "core" Perl5 object: What are the key data and behaviors ALL (or at least most) Perl5 objects should have?
Rationale
Use of Bio::Root::Object.pm within the Bioperl framework facilitates operational consistency across the different modules defined within the Bio:: namespace. Not all objects need to derive from Bio::Root::Object.pm. However, when generating lots of different types of potentially complex objects which should all conform to a set of basic expectations, this module may be handy.
At the very least, this module saves you from re-writing the new() method for each module you develop. It also permits consistent and robust handling of -tag => value method arguments via the Bio::Root::RootI::_rearrange() method and provides a object-oriented way handle exceptions and warnings via the Bio::Root::Root::throw() and Bio::Root::Root::warn() methods.
See the APPENDIX section for some other handy methods.
Fault-Tolerant Objects
A major motivation for this module was to promote the creation of robust, fault-tolerant Perl5 objects. The Bio::Root::Root::throw() method relies on Perls built-in eval{}/die exception mechanism to generate fatal exceptions. The data comprising an exception is managed by the Bio::Root::Err.pm module, which essentially allows the data thrown by a die() event to be wrapped into an object that can be easily examined and possibly re-thrown.
The intent here is three-fold:
1 Detailed error reporting.
Allow objects to report detailed information about the error condition (who, what, where, why, how).
2 Handle complex errors in objects.
The goal is to make it relatively painless to detect and handle the wide variety of errors possible with a complex Perl object. Perls error handling mechanism is a might clunky when it comes to handling complex errors within complex objects, but it is improving.
3 Efficient & easy exception handling.
To enable robust exception handling without incurring a significant performance penalty in the resulting code. Ideally, exception handling code should be transparent to the cpu until and unless an exception arises.
These goals may at times be at odds and we are not claiming to have achieved the perfect balance. Ultimately, we want self- sufficient object-oriented systems able to deal with their own errors. This area should improve as the module, and Perl, evolve. One possible modification might be to utilize Graham Barrs Error.pm module or Torsten Ekedahls Experimental::Exception.pm module (see "Other Exception Modules").
Technologies such as these may eventually be incorporated into future releases of Perl. The exception handling used by Bio::Root::Object.pm can be expected to change as Perls exception handling mechanism evolves.
TERMINOLOGY NOTE: In this discussion and elsewhere in this module, the terms "Exception" and "Error" are used interchangeably to mean "something unexpected occurred" either as a result of incorrect user input or faulty internal processing.
Download (4.7MB)
Added: 2006-06-16 License: Perl Artistic License Price:
1225 downloads
Object::LocalVars 0.16
Object::LocalVars is a Perl module with outside-in objects with local aliasing of $self and object variables. more>>
Object::LocalVars is a Perl module with outside-in objects with local aliasing of $self and object variables.
SYNOPSIS
package My::Object;
use strict;
use Object::LocalVars;
give_methods our $self; # this exact line is required
our $field1 : Prop;
our $field2 : Prop;
sub as_string : Method {
return "$self has properties $field1 and $field2";
}
This is a development release. The API may change slightly. Do not use for production purposes. Comments appreciated.
This module helps developers create "outside-in" objects. Properties (and $self) are declared as package globals. Method calls are wrapped such that these globals take on a local value that is correct for the specific calling object and the duration of the method call. I.e. $self is locally aliased to the calling object and properties are locally aliased to the values of the properties for that object. The package globals themselves only declare properties in the package and hold no data themselves. Data are stored in a separate namespace for each property, keyed off the reference memory addresses of the objects.
Outside-in objects are similar to "inside-out" objects, which store data in a single lexical hash (or closure) for each property, which is keyed off the reference memory addresses of the objects. Both differ from classic Perl objects, which hold data for the object directly using a blessed reference or closure to a data structure, typically a hash. For both outside-in and inside-out objects, data are stored centrally and the blessed reference is simply a key to look up the right data in the central data store.
The use of package variables for outside-in objects allows for the use of dynamic symbol table manipulation and aliasing. As a result, Object::LocalVars delivers a variety of features -- though with some corresponding drawbacks.
Main features:
- Provides $self automatically to methods without my $self = shift and the like
- Provides dynamic aliasing of properties within methods -- methods can access properties directly as variables without the overhead of calls to accessors or mutators, eliminating the overhead of these calls in methods
- Array and hash properties may be accessed via direct dereference of simple variables, allowing developers to push, pop, splice, etc. without the usual tortured syntax to dereference an accessor call
- Properties no longer require accessors to have compile time syntax checking under strictures (i.e. use strict); public properties have accessors automatically provided as needed
- Uses attributes to mark properties and methods, but only in the BEGIN phase so should be mod_perl friendly (though this has not been tested yet)
- Provides attributes for public, protected and private properties, class properties, and methods
- Orthogonality -- can subclass just about any other class, regardless of implementation.
- Multiple inheritance supported in initializers and destructors (though only one superclass can be of a special, orthogonal type)
- Minimally thread-safe under Perl 5.8 or greater -- objects are safely cloned across thread boundaries (or a pseudo-fork on Win32)
- Achieves these features without source filtering
<<lessSYNOPSIS
package My::Object;
use strict;
use Object::LocalVars;
give_methods our $self; # this exact line is required
our $field1 : Prop;
our $field2 : Prop;
sub as_string : Method {
return "$self has properties $field1 and $field2";
}
This is a development release. The API may change slightly. Do not use for production purposes. Comments appreciated.
This module helps developers create "outside-in" objects. Properties (and $self) are declared as package globals. Method calls are wrapped such that these globals take on a local value that is correct for the specific calling object and the duration of the method call. I.e. $self is locally aliased to the calling object and properties are locally aliased to the values of the properties for that object. The package globals themselves only declare properties in the package and hold no data themselves. Data are stored in a separate namespace for each property, keyed off the reference memory addresses of the objects.
Outside-in objects are similar to "inside-out" objects, which store data in a single lexical hash (or closure) for each property, which is keyed off the reference memory addresses of the objects. Both differ from classic Perl objects, which hold data for the object directly using a blessed reference or closure to a data structure, typically a hash. For both outside-in and inside-out objects, data are stored centrally and the blessed reference is simply a key to look up the right data in the central data store.
The use of package variables for outside-in objects allows for the use of dynamic symbol table manipulation and aliasing. As a result, Object::LocalVars delivers a variety of features -- though with some corresponding drawbacks.
Main features:
- Provides $self automatically to methods without my $self = shift and the like
- Provides dynamic aliasing of properties within methods -- methods can access properties directly as variables without the overhead of calls to accessors or mutators, eliminating the overhead of these calls in methods
- Array and hash properties may be accessed via direct dereference of simple variables, allowing developers to push, pop, splice, etc. without the usual tortured syntax to dereference an accessor call
- Properties no longer require accessors to have compile time syntax checking under strictures (i.e. use strict); public properties have accessors automatically provided as needed
- Uses attributes to mark properties and methods, but only in the BEGIN phase so should be mod_perl friendly (though this has not been tested yet)
- Provides attributes for public, protected and private properties, class properties, and methods
- Orthogonality -- can subclass just about any other class, regardless of implementation.
- Multiple inheritance supported in initializers and destructors (though only one superclass can be of a special, orthogonal type)
- Minimally thread-safe under Perl 5.8 or greater -- objects are safely cloned across thread boundaries (or a pseudo-fork on Win32)
- Achieves these features without source filtering
Download (0.040MB)
Added: 2007-06-22 License: Perl Artistic License Price:
854 downloads
XML::PatAct::ToObjects 0.08
XML::PatAct::ToObjects is an action module for creating Perl objects. more>>
XML::PatAct::ToObjects is an action module for creating Perl objects.
SYNOPSIS
use XML::PatAct::ToObjects;
my $patterns = [ PATTERN => [ OPTIONS ],
PATTERN => "PERL-CODE",
... ];
my $matcher = XML::PatAct::ToObjects->new( Patterns => $patterns,
Matcher => $matcher,
CopyId => 1,
CopyAttributes => 1 );
XML::PatAct::ToObjects is a PerlSAX handler for applying pattern-action lists to XML parses or trees. XML::PatAct::ToObjects creates Perl objects of the types and contents of the action items you define.
New XML::PatAct::ToObject instances are creating by calling `new(). Parameters can be passed as a list of key, value pairs or a hash. `new() requires the Patterns and Matcher parameters, the rest are optional:
Patterns
The pattern-action list to apply.
Matcher
An instance of the pattern or query matching module.
CopyId
Causes the `ID attribute, if any, in a source XML element to be copied to an `ID attribute in newly created objects. Note that IDs may be lost of no pattern matches that element or an object is not created (-make) for that element.
CopyAttributes
Causes all attributes of the element to be copied to the newly created objects.
Each action can either be a list of options defined below or a string containing a fragment of Perl code. If the action is a string of Perl code then simple then some simple substitutions are made as described further below.
<<lessSYNOPSIS
use XML::PatAct::ToObjects;
my $patterns = [ PATTERN => [ OPTIONS ],
PATTERN => "PERL-CODE",
... ];
my $matcher = XML::PatAct::ToObjects->new( Patterns => $patterns,
Matcher => $matcher,
CopyId => 1,
CopyAttributes => 1 );
XML::PatAct::ToObjects is a PerlSAX handler for applying pattern-action lists to XML parses or trees. XML::PatAct::ToObjects creates Perl objects of the types and contents of the action items you define.
New XML::PatAct::ToObject instances are creating by calling `new(). Parameters can be passed as a list of key, value pairs or a hash. `new() requires the Patterns and Matcher parameters, the rest are optional:
Patterns
The pattern-action list to apply.
Matcher
An instance of the pattern or query matching module.
CopyId
Causes the `ID attribute, if any, in a source XML element to be copied to an `ID attribute in newly created objects. Note that IDs may be lost of no pattern matches that element or an object is not created (-make) for that element.
CopyAttributes
Causes all attributes of the element to be copied to the newly created objects.
Each action can either be a list of options defined below or a string containing a fragment of Perl code. If the action is a string of Perl code then simple then some simple substitutions are made as described further below.
Download (0.031MB)
Added: 2006-09-15 License: Perl Artistic License Price:
1134 downloads
Secleted [ 0 ] software to compare
Copyright Notice:
Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future software development. The above perl objects search only lists software in full, demo and trial versions for free download. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed