attribute
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 635
Be::Attribute 0.1
Be::Attribute is a Perl module to get and set MIME file attributes. more>>
Be::Attribute is a Perl module to get and set MIME file attributes.
SYNOPSIS
use Be::Attribute;
$node = Be::Attribute::GetBNode("/my/file/here");
@attrs = Be::Attribute::ListAttrs($node);
for $i (@attrs) {
print "$i - ", Be::Attribute::ReadAttr($node, $i), "n";
}
Be::Attribute::CloseNode($node);
Get (or set) MIME file attributes.
USAGE
lookit the synopsis. look at example.pl. Look at the .xs code. Read the Node webpage.
<<lessSYNOPSIS
use Be::Attribute;
$node = Be::Attribute::GetBNode("/my/file/here");
@attrs = Be::Attribute::ListAttrs($node);
for $i (@attrs) {
print "$i - ", Be::Attribute::ReadAttr($node, $i), "n";
}
Be::Attribute::CloseNode($node);
Get (or set) MIME file attributes.
USAGE
lookit the synopsis. look at example.pl. Look at the .xs code. Read the Node webpage.
Download (0.003MB)
Added: 2007-04-12 License: Perl Artistic License Price:
925 downloads
File::Attributes 0.04
File::Attributes is a Perl module to manipulate file metadata. more>>
File::Attributes is a Perl module to manipulate file metadata.
SYNOPSIS
use File::Attributes qw(set_attribute list_attributes get_all_attributes);
my $file = foo.txt;
set_attribute($file, type => text/plain);
set_attribute($file, encoding => utf8);
my @attributes = list_attributes($file);
# @attributes = qw(type encoding)
%attributes = get_attributes($file);
# $attributes{type} will be text/plain
# $attributes{foo} will be undefined.
File::Attributes is a wrapper around modules in the File::Attributes hierarchy. If you use this module directly (instead of one of the aforementioned decendants), then your attribute manipulations will Just Work, regardless of the underlying filesystem.
Module::Pluggable is used to find all File::Attributes:: modules that inherit from File::Attributes::Base and that are applicable on your system. If it finds one, it uses that. If not, it uses File::Attributes::Simple, which is bundled with this module and works everywhere.
As of version 0.04, plugins are now set up per-file, not per-system. This means that if you have File::Attributes::Extended installed, extended attributes will be used where available, but Simple attributes will be used on files where extended attributes dont work (a FAT filesytem on a Linux machine, for example). Existing simple attributes will be read even if extended attributes are available, but writes will affect only the extended attributes.
This means that you can switch to a better attribute plugin at any time, without losing any old data!
<<lessSYNOPSIS
use File::Attributes qw(set_attribute list_attributes get_all_attributes);
my $file = foo.txt;
set_attribute($file, type => text/plain);
set_attribute($file, encoding => utf8);
my @attributes = list_attributes($file);
# @attributes = qw(type encoding)
%attributes = get_attributes($file);
# $attributes{type} will be text/plain
# $attributes{foo} will be undefined.
File::Attributes is a wrapper around modules in the File::Attributes hierarchy. If you use this module directly (instead of one of the aforementioned decendants), then your attribute manipulations will Just Work, regardless of the underlying filesystem.
Module::Pluggable is used to find all File::Attributes:: modules that inherit from File::Attributes::Base and that are applicable on your system. If it finds one, it uses that. If not, it uses File::Attributes::Simple, which is bundled with this module and works everywhere.
As of version 0.04, plugins are now set up per-file, not per-system. This means that if you have File::Attributes::Extended installed, extended attributes will be used where available, but Simple attributes will be used on files where extended attributes dont work (a FAT filesytem on a Linux machine, for example). Existing simple attributes will be read even if extended attributes are available, but writes will affect only the extended attributes.
This means that you can switch to a better attribute plugin at any time, without losing any old data!
Download (0.030MB)
Added: 2007-04-25 License: Perl Artistic License Price:
912 downloads
Getopt::Attribute 1.3.2
Getopt::Attribute is a Perl module to attribute wrapper for Getopt::Long. more>>
Getopt::Attribute is a Perl module to attribute wrapper for Getopt::Long.
SYNOPSIS
use Getopt::Attribute;
our $verbose : Getopt(verbose!);
our $all : Getopt(all);
our $size : Getopt(size=s);
our $more : Getopt(more+);
our @library : Getopt(library=s);
our %defines : Getopt(define=s);
sub quiet : Getopt(quiet) { our $quiet_msg = seen quiet }
usage() if our $man : Getopt(man);
...
# Meanwhile, on some command line:
mypgm.pl --noverbose --all --size=23 --more --more --more --quiet
--library lib/stdlib --library lib/extlib
--define os=linux --define vendor=redhat --man -- foo
Note: This version of the module works works with perl 5.8.0. If you need it to work with perl 5.6.x, please use an earlier version from CPAN.
This module provides an attribute wrapper around Getopt::Long. Instead of declaring the options in a hash with references to the variables and subroutines affected by the options, you can use the Getopt attribute on the variables and subroutines directly.
As you can see from the Synopsis, the attribute takes an argument of the same format as you would give as the hash key for Getopt::Long. See the Getopt::Long manpage for details.
Note that since attributes are processed during CHECK, but assignments on newly declared variables are processed during run-time, you cant set defaults on those variables beforehand, like this:
our $verbose : Getopt(verbose!) = 1; # DOES NOT WORK
Instead, you have to establish defaults afterwards, like so:
our $verbose : Getopt(verbose!);
$verbose ||= 1;
Alternatively, you can specify a default value within the Getopt attribute:
our $def2 : Getopt(def2=i 42);
<<lessSYNOPSIS
use Getopt::Attribute;
our $verbose : Getopt(verbose!);
our $all : Getopt(all);
our $size : Getopt(size=s);
our $more : Getopt(more+);
our @library : Getopt(library=s);
our %defines : Getopt(define=s);
sub quiet : Getopt(quiet) { our $quiet_msg = seen quiet }
usage() if our $man : Getopt(man);
...
# Meanwhile, on some command line:
mypgm.pl --noverbose --all --size=23 --more --more --more --quiet
--library lib/stdlib --library lib/extlib
--define os=linux --define vendor=redhat --man -- foo
Note: This version of the module works works with perl 5.8.0. If you need it to work with perl 5.6.x, please use an earlier version from CPAN.
This module provides an attribute wrapper around Getopt::Long. Instead of declaring the options in a hash with references to the variables and subroutines affected by the options, you can use the Getopt attribute on the variables and subroutines directly.
As you can see from the Synopsis, the attribute takes an argument of the same format as you would give as the hash key for Getopt::Long. See the Getopt::Long manpage for details.
Note that since attributes are processed during CHECK, but assignments on newly declared variables are processed during run-time, you cant set defaults on those variables beforehand, like this:
our $verbose : Getopt(verbose!) = 1; # DOES NOT WORK
Instead, you have to establish defaults afterwards, like so:
our $verbose : Getopt(verbose!);
$verbose ||= 1;
Alternatively, you can specify a default value within the Getopt attribute:
our $def2 : Getopt(def2=i 42);
Download (0.003MB)
Added: 2007-04-12 License: Perl Artistic License Price:
925 downloads
Attribute::Handlers 0.85
Attribute::Handlers is a multi-purpose, highly customizable Linux programming tool. more>> Attribute:Handlers 0.85 is a multi-purpose, highly customizable Linux programming tool. This module, when inherited by a package, allows that package's class to define attribute handler subroutines for specific attributes. Variables and subroutines subsequently defined in that package, or in packages derived from that package may be given attributes with the same names as the attribute handler subroutines, which will then be called in one of the compilation phases (i.e. in a BEGIN, CHECK, INIT, or END block). (UNITCHECK blocks don't correspond to a global compilation phase, so they can't be specified here.)
To create a handler, define it as a subroutine with the same name as the desired attribute, and declare the subroutine itself with the attribute.
Added: 2009-07-26 License: Perl Artistic License Price: FREE
downloads
Class::Declare::Attributes 0.04
Class::Declare::Attributes is a Perl module with Class::Declare method types using Perl attributes. more>>
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 class/instance attributes
__PACKAGE__->declare( ... );
#
# declare class/static/restricted/etc methods of this package
#
sub my_abstract : abstract { ... }
sub my_class : class { ... }
sub my_static : static { ... }
sub my_restricted : restricted { ... }
sub my_public : public { ... }
sub my_private : private { ... }
sub my_protected : protected { ... }
Class::Declare::Attributes extends Class::Declare by adding support for Perl attributes for specifying class method types. This extension was inspired by Damian Conways Attribute::Handlers module, and Tatsuhiko Miyagawas Attribute::Protected module. The original implementation used Attribute::Handlers, but now simply refers to attributes.
The addition of Perl attribute support (not to be confused with object attributes, which are entirely different, and also supported by Class::Declare) greatly simplifies the specification of Class::Declare-derived class and instance methods. This should aid in the porting of existing code (Perl, Java and C++) to a Class::Declare framework, as well as simplify the development of new modules.
With the addition of Perl attributes, Class::Declare methods can now be written as
sub method : public
{
my $self = shift;
...
}
instead of
sub method
{
my $self = __PACKAGE__->public( shift );
...
}
<<lessSYNOPSIS
package My::Class;
use 5.006;
use strict;
use warnings;
use base qw( Class::Declare::Attributes );
# declare the class/instance attributes
__PACKAGE__->declare( ... );
#
# declare class/static/restricted/etc methods of this package
#
sub my_abstract : abstract { ... }
sub my_class : class { ... }
sub my_static : static { ... }
sub my_restricted : restricted { ... }
sub my_public : public { ... }
sub my_private : private { ... }
sub my_protected : protected { ... }
Class::Declare::Attributes extends Class::Declare by adding support for Perl attributes for specifying class method types. This extension was inspired by Damian Conways Attribute::Handlers module, and Tatsuhiko Miyagawas Attribute::Protected module. The original implementation used Attribute::Handlers, but now simply refers to attributes.
The addition of Perl attribute support (not to be confused with object attributes, which are entirely different, and also supported by Class::Declare) greatly simplifies the specification of Class::Declare-derived class and instance methods. This should aid in the porting of existing code (Perl, Java and C++) to a Class::Declare framework, as well as simplify the development of new modules.
With the addition of Perl attributes, Class::Declare methods can now be written as
sub method : public
{
my $self = shift;
...
}
instead of
sub method
{
my $self = __PACKAGE__->public( shift );
...
}
Download (0.021MB)
Added: 2007-06-20 License: Perl Artistic License Price:
857 downloads
File::Attributes::Recursive 0.02
File::Attributes::Recursive module contains inherit file attributes from parent directories. more>>
File::Attributes::Recursive module contains inherit file attributes from parent directories.
SYNOPSIS
Works like File::Attributes, but will recurse up the directory tree until a matching attribute is found.
EXPORT
None, by default. Specify the functions youd like to use as arguments to the module. :all means export everything.
FUNCTIONS
get_attribute_recursively($file, [$top], $attribute)
Returns the value of attribute $attribute. If $top is specified, then the search will terminate when the path no longer contains $top. (i.e. if $file is /foo/bar/baz/quux and $top is
get_attributes_recursively($file, [$top])
Returns a hash of key value pairs for all attributes that apply to $file. Only the closest attributes are returned. Given:
/a (a = yes, foo = bar)
/a/b (b = yes, foo = baz)
/a/b/c (c = yes)
get_attributes_recursively(/a/b/c, /a) will return:
(a => yes, b => yes, c => yes, foo => baz).
The foo => bar is masked by the "closer" foo => baz.
list_attributes_recursively($file, [$top])
Returns a list of attributes that are defined and apply to $file. Like keys get_attributes_recursively($file, [$top]), but faster.
NOTABLY ABSENT FUNCTIONS
unset_attribute_recursively
There are two possible ways for this function to behave -- either recurse until the attribute is removed, or recurse to top, removing the attribute at each level. The first doesnt make sense, and the second is dangerous. If you need this function, write it for the specific needs of your application; I think thats the safest thing to do.
(Note that rm refuses to rm .., so I think theres some precedent here.)
Enhancements:
- Perl
<<lessSYNOPSIS
Works like File::Attributes, but will recurse up the directory tree until a matching attribute is found.
EXPORT
None, by default. Specify the functions youd like to use as arguments to the module. :all means export everything.
FUNCTIONS
get_attribute_recursively($file, [$top], $attribute)
Returns the value of attribute $attribute. If $top is specified, then the search will terminate when the path no longer contains $top. (i.e. if $file is /foo/bar/baz/quux and $top is
get_attributes_recursively($file, [$top])
Returns a hash of key value pairs for all attributes that apply to $file. Only the closest attributes are returned. Given:
/a (a = yes, foo = bar)
/a/b (b = yes, foo = baz)
/a/b/c (c = yes)
get_attributes_recursively(/a/b/c, /a) will return:
(a => yes, b => yes, c => yes, foo => baz).
The foo => bar is masked by the "closer" foo => baz.
list_attributes_recursively($file, [$top])
Returns a list of attributes that are defined and apply to $file. Like keys get_attributes_recursively($file, [$top]), but faster.
NOTABLY ABSENT FUNCTIONS
unset_attribute_recursively
There are two possible ways for this function to behave -- either recurse until the attribute is removed, or recurse to top, removing the attribute at each level. The first doesnt make sense, and the second is dangerous. If you need this function, write it for the specific needs of your application; I think thats the safest thing to do.
(Note that rm refuses to rm .., so I think theres some precedent here.)
Enhancements:
- Perl
Download (0.025MB)
Added: 2007-07-25 License: Perl Artistic License Price:
821 downloads
Extended attributes for Python 0.1.3
Extended attributes for Python is a Python module created to manipulate extended attributes in filesystems that support them. more>>
Extended attributes for Python is a Python module that can manipulate extended attributes in filesystems that support them.
<<less Download (0.012MB)
Added: 2005-12-03 License: GPL (GNU General Public License) Price:
1420 downloads
Object::Relation::Meta::Attribute::Schema 0.1.0
Object::Relation::Meta::Attribute::Schema is a Perl module for Object::Relation database store builder. more>>
Object::Relation::Meta::Attribute::Schema is a Perl module for Object::Relation database store builder.
Synopsis
# Assuming MyThingy was generated by Object::Relation::Meta and that were building
# a data store schema.
my $class = MyThingy->my_class;
print "nAttributes:n";
for my $attr ($class->attributes) {
print " o ", $attr->name, $/;
print " Column: ", $attr->column, $/;
if (my $idx = $attr->index) {
print " Index: $idxn";
}
if (my $ref = $attr->references) {
print " References ", $ref->package, $/;
print " On Delete: ", $attr->on_delete, $/;
}
}
This module is provides metadata for all Object::Relation class attributes while building a storage schema. Loading Object::Relation::Schema causes it to be used instead of Object::Relation::Meta::Attribute. This is so that extra metadata methods are available that are useful in constructing the schema, but are not otherwise useful when an application is actually in use.
<<lessSynopsis
# Assuming MyThingy was generated by Object::Relation::Meta and that were building
# a data store schema.
my $class = MyThingy->my_class;
print "nAttributes:n";
for my $attr ($class->attributes) {
print " o ", $attr->name, $/;
print " Column: ", $attr->column, $/;
if (my $idx = $attr->index) {
print " Index: $idxn";
}
if (my $ref = $attr->references) {
print " References ", $ref->package, $/;
print " On Delete: ", $attr->on_delete, $/;
}
}
This module is provides metadata for all Object::Relation class attributes while building a storage schema. Loading Object::Relation::Schema causes it to be used instead of Object::Relation::Meta::Attribute. This is so that extra metadata methods are available that are useful in constructing the schema, but are not otherwise useful when an application is actually in use.
Download (0.23MB)
Added: 2006-09-26 License: Perl Artistic License Price:
1123 downloads
Rose::DateTime::Util 0.532
Rose::DateTime::Util Perl module contains some simple DateTime wrapper functions. more>>
Rose::DateTime::Util Perl module contains some simple DateTime wrapper functions.
SYNOPSIS
use Rose::DateTime::Util qw(:all);
$now = parse_date(now);
$then = parse_date(12/25/2001 11pm);
print $now->day_of_week; # e.g., "Monday"
# "December 25th 2001 at 11:00:00 PM"
$date_text = format_date($then, "%B %E %Y at %t");
EXPORTS
Rose::DateTime::Util does not export any function names by default.
The all tag:
use Rose::DateTime::Util qw(:all);
will cause the following function names to be imported:
format_date()
parse_date()
parse_epoch()
parse_european_date()
CLASS METHODS
error
Returns a message describing the last error that occurred.
european_dates [BOOL]
Get or set a boolean flag that determines how "xx/xx/xxxx" dates are parsed by the parse_date function. If set to a false-but-defined value, then such dates are parsed as "mm/dd/yyyy". If set to true, then theyre parsed as "dd/mm/yyyy". If set to undef, then the attribute resets to its initial value, which is determined as described below.
The initial value of this attribute is chosen based on the current locale as stored in DateTimes DefaultLocale setting. This initial value is looked up only once. Any subsequent changes to DateTimes DefaultLocale setting will be ignored until/unless this attribute is reset to undef.
time_zone [TZ]
Get or set the default time zone. This value is passed to DateTime->new(...) as the value of the time_zone parameter when parse_date() creates the DateTime object that it returns. The default value is "floating".
<<lessSYNOPSIS
use Rose::DateTime::Util qw(:all);
$now = parse_date(now);
$then = parse_date(12/25/2001 11pm);
print $now->day_of_week; # e.g., "Monday"
# "December 25th 2001 at 11:00:00 PM"
$date_text = format_date($then, "%B %E %Y at %t");
EXPORTS
Rose::DateTime::Util does not export any function names by default.
The all tag:
use Rose::DateTime::Util qw(:all);
will cause the following function names to be imported:
format_date()
parse_date()
parse_epoch()
parse_european_date()
CLASS METHODS
error
Returns a message describing the last error that occurred.
european_dates [BOOL]
Get or set a boolean flag that determines how "xx/xx/xxxx" dates are parsed by the parse_date function. If set to a false-but-defined value, then such dates are parsed as "mm/dd/yyyy". If set to true, then theyre parsed as "dd/mm/yyyy". If set to undef, then the attribute resets to its initial value, which is determined as described below.
The initial value of this attribute is chosen based on the current locale as stored in DateTimes DefaultLocale setting. This initial value is looked up only once. Any subsequent changes to DateTimes DefaultLocale setting will be ignored until/unless this attribute is reset to undef.
time_zone [TZ]
Get or set the default time zone. This value is passed to DateTime->new(...) as the value of the time_zone parameter when parse_date() creates the DateTime object that it returns. The default value is "floating".
Download (0.012MB)
Added: 2007-07-24 License: Perl Artistic License Price:
822 downloads
ferrisfuse 0.1.0
ferrisfuse is a FUSE module for mounting libferris filesystems through the Linux kernel. more>>
ferrisfuse is a FUSE module for mounting libferris filesystems through the Linux kernel.
About libferris
In non technical terms libferris makes the file system and other hierarchical storage systems easier to use. For the geeks out there, libferris is a virtual file system (VFS) that runs in the user address space. The FAQ contains entries related to installation, configuration and the usage of libferris.
As of July 2005 libferris can mount many interesting things ranging from a filesystem from your local Linux kernel through to LDAP, Evolution, PostgreSQL, dbXML, and RDF. To get an impression of the current capabilities of libferris mounting see the plugins/context directory of the lastest release. New things to mount are always being added.
Other than mounting things as a filesystem, the other core concept of libferris is extraction of interesting metadata from your libferris filesystems. This means that simple things like width and height of an image file become first class metadata citizens along with a files size and modification time. The limits on what metadata is available extend far beyond image metadata to include XMP, EXIF, music ID tags, geospatial tags, rpm metadata, SELinux integration, partially ordered emblem categories and arbitrary personal RDF stores of metadata.
Though some consider the last point of purely academic interest the end result is that you can add metadata to *all* libferris objects even those you only have read access too, for example, you can attach emblems to this website just as you would a normal file. The metadata interface gives all metadata from file size to digital signature status information equal standing. As such you can sort a directory by any metadata just as easily as you would ls -Sh to sort by file size. Sorting on multiple metadata values is also supported in libferris, you can easily sort your files by mimetype, then image width, then modification time with all three pieces of metadata contributing to the final directory ordering.
Late in 2004 extensive support for both fulltext and metadata indexing was added to libferris. This means you can supply queries against the contents or metadata of any libferris accessable object and have the results returned as a virtual filesystem. With the above mentioned metadata available for searching, finding your files can be done in many different ways instead of being forced to generate fixed directory trees using part of a file collections semantics as directory names. The metadata and virtual filesystem play together here allowing you to geospatially tag both your digital pictures, trip plans, and relevent websites and recall these objects in a single virtual directory no matter what their path or URL may be.
There is also a Samba VFS module which allows you to expose a libferris filesystem as a Samba share. Kfsmd uses the inotify kernel interface to allow libferris to watch changes made to your kernel filesystem by non libferris applications and update its indexes appropriately. Ferriscreate provides a command line and GTK+2 application for creating "new files" with libferris. With this you can create a new db4 database, dbXML database or fulltext index just as easily as you can make a regular file.
The ego filemanager is a GTK+2 interface built on top of libferris. It provides GTK treeview , gevas/edje and gecko based interfaces and makes extensive use of libferris clients to provide its functionality.
If you have a project you wish to use libferris with and want extensions made dont hesitate to contact one of the developers to arrange consulting.
For the geeks out there, libferris is a virtual file system (VFS) that runs in the user address space. At the moment libferris is a shared object that each application can dynamically link to in order to see the file system through a nicer abstraction.
New additions to the XML module allow for data to be converted from one format to another by the VFS for you. To copy data to an XML file:
fcreate --create-type=xml --rdn=2.xml root-element=fred /tmp
gfcp -av Makefile.am --dst-is-dir /tmp/2.xml/fred
To copy data to a db4 file
fcreate --create-type=db4 --rdn=2.db /tmp
gfcp -av Makefile.am --dst-is-dir /tmp/2.db
Ferris presents a C++ interface that makes heavy use of the STL and IOStreams. Currently ferris has two main internal abstractions: Context and Attribute. A context is much like a traditional file or directory in a file system, the major differences being that a context can have both byte content (like a file) and subcontexts (like a directory). An attribute is a chunk of metadata about a context. Contexts can have many attributes.
Some attributes may be large, for example a base 64 encoded version of the contexts content (133% context size). On the other hand an attribute can be small, for example the file size is exposed as an attribute.
Access to all contexts and attributes is performed by first requesting either an IStream or IOStream for that context or attribute. In this way the same context/attribute can be open many times at the same time, just like normal kernel based IO.
Ferris uses Loki from "Modern C++ Design" by Alexandrescu. Most objects use automatic garbage collection based on the SmartPtr template class from Loki. Where possible objects in ferris use a FerrisRefCounted policy to provide COM like intrusive reference counting. This style is used for Context, Attribute and special wrappers of IOStreams that are provided. IOStreams are wrapped to provide a more flexible API than could be offered using references to IOStreams.
There are also new stream classes provided, for example NullStream and LimitingStream. Templates are provided to make SmartPtrs to standard IOStreams act just like the underlying stream would, for example, one can have SmartPtr ss; ss >> stringObj; and does not have to dereference the SmartPtr to use standard IOStreams extractors or inserters.
Ferris uses GModule from glib2 to dynamically load both context and attribute classes at run-time. This way resources are conserved until they are needed. The native file system context is statically linked to ferris at present. When loading either contexts or attribute classes ferris uses a double dispatch factory method. Put simply this means that for each plugin there are two libraries, one that tells ferris if the main one really needs to be loaded or not. Using this scheme ferris can load all the meta factory classes at any time and use these very small meta factories to check if the main factory can create objects that are going to be useful.
This scheme is of great use for attribute classes. Attribute classes take a context and can "generate" attributes from the context. An example of this sort of class would be a MD5 or Base64 attribute. Both can be generated from the base context. More interesting attributes are PCM audio and RGBA-32bpp image data. By using the double dispatch factory ferris can handle a great deal of attribute generators and load them on demand.
Ferris currently can decode mp3, read id3 tags, decode many image formats and break some animation formats into frames. This makes ferris a solid starting point for multimedia applications.
Ferris will automatically mount sub file systems for you. Examples of a sub file system include a Berkeley database or XML file. For example it is possible to read a context such as /tmp/myxml.xml/mynode. Using this automatic mounting the differences between storage formats effectively disappear. To a ferris enabled application loading data from a native disk file, a Berkeley database, and XML file, or mbox file appear to be the same. This allows the user of the application to choose the correct storage for the data at hand.
It is planned to move to a microkernel architecture in Version 2.1 of ferris. I choose 2.1 so that ferris does not fall into version 2 syndrome.
Enhancements:
- Many changes were made to better support rsync(1).
- Extended Attribute support was greatly improved.
- write() now also updates mtime.
<<lessAbout libferris
In non technical terms libferris makes the file system and other hierarchical storage systems easier to use. For the geeks out there, libferris is a virtual file system (VFS) that runs in the user address space. The FAQ contains entries related to installation, configuration and the usage of libferris.
As of July 2005 libferris can mount many interesting things ranging from a filesystem from your local Linux kernel through to LDAP, Evolution, PostgreSQL, dbXML, and RDF. To get an impression of the current capabilities of libferris mounting see the plugins/context directory of the lastest release. New things to mount are always being added.
Other than mounting things as a filesystem, the other core concept of libferris is extraction of interesting metadata from your libferris filesystems. This means that simple things like width and height of an image file become first class metadata citizens along with a files size and modification time. The limits on what metadata is available extend far beyond image metadata to include XMP, EXIF, music ID tags, geospatial tags, rpm metadata, SELinux integration, partially ordered emblem categories and arbitrary personal RDF stores of metadata.
Though some consider the last point of purely academic interest the end result is that you can add metadata to *all* libferris objects even those you only have read access too, for example, you can attach emblems to this website just as you would a normal file. The metadata interface gives all metadata from file size to digital signature status information equal standing. As such you can sort a directory by any metadata just as easily as you would ls -Sh to sort by file size. Sorting on multiple metadata values is also supported in libferris, you can easily sort your files by mimetype, then image width, then modification time with all three pieces of metadata contributing to the final directory ordering.
Late in 2004 extensive support for both fulltext and metadata indexing was added to libferris. This means you can supply queries against the contents or metadata of any libferris accessable object and have the results returned as a virtual filesystem. With the above mentioned metadata available for searching, finding your files can be done in many different ways instead of being forced to generate fixed directory trees using part of a file collections semantics as directory names. The metadata and virtual filesystem play together here allowing you to geospatially tag both your digital pictures, trip plans, and relevent websites and recall these objects in a single virtual directory no matter what their path or URL may be.
There is also a Samba VFS module which allows you to expose a libferris filesystem as a Samba share. Kfsmd uses the inotify kernel interface to allow libferris to watch changes made to your kernel filesystem by non libferris applications and update its indexes appropriately. Ferriscreate provides a command line and GTK+2 application for creating "new files" with libferris. With this you can create a new db4 database, dbXML database or fulltext index just as easily as you can make a regular file.
The ego filemanager is a GTK+2 interface built on top of libferris. It provides GTK treeview , gevas/edje and gecko based interfaces and makes extensive use of libferris clients to provide its functionality.
If you have a project you wish to use libferris with and want extensions made dont hesitate to contact one of the developers to arrange consulting.
For the geeks out there, libferris is a virtual file system (VFS) that runs in the user address space. At the moment libferris is a shared object that each application can dynamically link to in order to see the file system through a nicer abstraction.
New additions to the XML module allow for data to be converted from one format to another by the VFS for you. To copy data to an XML file:
fcreate --create-type=xml --rdn=2.xml root-element=fred /tmp
gfcp -av Makefile.am --dst-is-dir /tmp/2.xml/fred
To copy data to a db4 file
fcreate --create-type=db4 --rdn=2.db /tmp
gfcp -av Makefile.am --dst-is-dir /tmp/2.db
Ferris presents a C++ interface that makes heavy use of the STL and IOStreams. Currently ferris has two main internal abstractions: Context and Attribute. A context is much like a traditional file or directory in a file system, the major differences being that a context can have both byte content (like a file) and subcontexts (like a directory). An attribute is a chunk of metadata about a context. Contexts can have many attributes.
Some attributes may be large, for example a base 64 encoded version of the contexts content (133% context size). On the other hand an attribute can be small, for example the file size is exposed as an attribute.
Access to all contexts and attributes is performed by first requesting either an IStream or IOStream for that context or attribute. In this way the same context/attribute can be open many times at the same time, just like normal kernel based IO.
Ferris uses Loki from "Modern C++ Design" by Alexandrescu. Most objects use automatic garbage collection based on the SmartPtr template class from Loki. Where possible objects in ferris use a FerrisRefCounted policy to provide COM like intrusive reference counting. This style is used for Context, Attribute and special wrappers of IOStreams that are provided. IOStreams are wrapped to provide a more flexible API than could be offered using references to IOStreams.
There are also new stream classes provided, for example NullStream and LimitingStream. Templates are provided to make SmartPtrs to standard IOStreams act just like the underlying stream would, for example, one can have SmartPtr ss; ss >> stringObj; and does not have to dereference the SmartPtr to use standard IOStreams extractors or inserters.
Ferris uses GModule from glib2 to dynamically load both context and attribute classes at run-time. This way resources are conserved until they are needed. The native file system context is statically linked to ferris at present. When loading either contexts or attribute classes ferris uses a double dispatch factory method. Put simply this means that for each plugin there are two libraries, one that tells ferris if the main one really needs to be loaded or not. Using this scheme ferris can load all the meta factory classes at any time and use these very small meta factories to check if the main factory can create objects that are going to be useful.
This scheme is of great use for attribute classes. Attribute classes take a context and can "generate" attributes from the context. An example of this sort of class would be a MD5 or Base64 attribute. Both can be generated from the base context. More interesting attributes are PCM audio and RGBA-32bpp image data. By using the double dispatch factory ferris can handle a great deal of attribute generators and load them on demand.
Ferris currently can decode mp3, read id3 tags, decode many image formats and break some animation formats into frames. This makes ferris a solid starting point for multimedia applications.
Ferris will automatically mount sub file systems for you. Examples of a sub file system include a Berkeley database or XML file. For example it is possible to read a context such as /tmp/myxml.xml/mynode. Using this automatic mounting the differences between storage formats effectively disappear. To a ferris enabled application loading data from a native disk file, a Berkeley database, and XML file, or mbox file appear to be the same. This allows the user of the application to choose the correct storage for the data at hand.
It is planned to move to a microkernel architecture in Version 2.1 of ferris. I choose 2.1 so that ferris does not fall into version 2 syndrome.
Enhancements:
- Many changes were made to better support rsync(1).
- Extended Attribute support was greatly improved.
- write() now also updates mtime.
Download (0.27MB)
Added: 2007-06-13 License: GPL (GNU General Public License) Price:
866 downloads
mod_mime_xattr 0.4
mod_mime_xattr is a module for the Apache HTTPD 2.0 which may be used to set a range of MIME properties. more>>
mod_mime_xattr is a simple Apache HTTPD module that lets you use file system extended attributes data for MIME type detection.
The current version of mod_mime_xattr has support for Linux style EAs which are supported by Linux 2.4 with the ACL/EA patches applied and vanilla Linux 2.6. The following attributes may be used:
- user.mime_type: set the MIME type of a file explicitly. This attribute is compatible with the shared MIME database specification as published by freedesktop.org
- user.charset: set the charset used in a file
- user.mime_encoding: set the MIME encoding of a file (e.g. gzip)
- user.apache_handler: set the apache handler of a file explicitly
Usage:
You may get/set an extended attribute for a file with the Linux command line utilities getfattr/setfattr:
setfattr -n "user.mime_type" -v "text/html" foo.file
The file foo.file will be served as HTML now. For more information consult the concerning man pages.
If used with symbolic links, mod_mime_xattr will first check if an EA is set for the symlink itself, and second for the file the link points to. The user.charset EA is only used when the user.mime_type EA is set as well.
Enhancements:
- This version was updated for Apache 2.2.
<<lessThe current version of mod_mime_xattr has support for Linux style EAs which are supported by Linux 2.4 with the ACL/EA patches applied and vanilla Linux 2.6. The following attributes may be used:
- user.mime_type: set the MIME type of a file explicitly. This attribute is compatible with the shared MIME database specification as published by freedesktop.org
- user.charset: set the charset used in a file
- user.mime_encoding: set the MIME encoding of a file (e.g. gzip)
- user.apache_handler: set the apache handler of a file explicitly
Usage:
You may get/set an extended attribute for a file with the Linux command line utilities getfattr/setfattr:
setfattr -n "user.mime_type" -v "text/html" foo.file
The file foo.file will be served as HTML now. For more information consult the concerning man pages.
If used with symbolic links, mod_mime_xattr will first check if an EA is set for the symlink itself, and second for the file the link points to. The user.charset EA is only used when the user.mime_type EA is set as well.
Enhancements:
- This version was updated for Apache 2.2.
Download (0.072MB)
Added: 2007-04-17 License: The Apache License Price:
920 downloads
Class::ObjectTemplate 0.7
Class::ObjectTemplate is a Perl extension for an optimized template builder base class. more>>
Class::ObjectTemplate is a Perl extension for an optimized template builder base class.
SYNOPSIS
package Foo;
use Class::ObjectTemplate;
require Exporter;
@ISA = qw(Class::ObjectTemplate Exporter);
attributes(one, two, three);
# initialize will be called by new()
sub initialize {
my $self = shift;
$self->three(1) unless defined $self->three();
}
use Foo;
$foo = Foo->new();
# store 27 in the one attribute
$foo->one(27);
# check the value in the two attribute
die "should be undefined" if defined $foo->two();
# set using the utility method
$foo->set_attribute(one,27);
# check using the utility method
$two = $foo->get_attribute(two);
# set more than one attribute using the named parameter style
$foo->set_attributes(one=>27, two=>42);
# or using array references
$foo->set_attributes([one,two],[27,42]);
# get more than one attribute
@list = $foo->get_attributes(one, two);
# get a list of all attributes known by an object
@attrs = $foo->get_attribute_names();
# check that initialize() is called properly
die "initialize didnt set three()" unless $foo->three();
Class::ObjectTemplate is a utility class to assist in the building of other Object Oriented Perl classes.
It was described in detail in the OReilly book, "Advanced Perl Programming" by Sriram Srinivasam.
<<lessSYNOPSIS
package Foo;
use Class::ObjectTemplate;
require Exporter;
@ISA = qw(Class::ObjectTemplate Exporter);
attributes(one, two, three);
# initialize will be called by new()
sub initialize {
my $self = shift;
$self->three(1) unless defined $self->three();
}
use Foo;
$foo = Foo->new();
# store 27 in the one attribute
$foo->one(27);
# check the value in the two attribute
die "should be undefined" if defined $foo->two();
# set using the utility method
$foo->set_attribute(one,27);
# check using the utility method
$two = $foo->get_attribute(two);
# set more than one attribute using the named parameter style
$foo->set_attributes(one=>27, two=>42);
# or using array references
$foo->set_attributes([one,two],[27,42]);
# get more than one attribute
@list = $foo->get_attributes(one, two);
# get a list of all attributes known by an object
@attrs = $foo->get_attribute_names();
# check that initialize() is called properly
die "initialize didnt set three()" unless $foo->three();
Class::ObjectTemplate is a utility class to assist in the building of other Object Oriented Perl classes.
It was described in detail in the OReilly book, "Advanced Perl Programming" by Sriram Srinivasam.
Download (0.006MB)
Added: 2006-10-05 License: Perl Artistic License Price:
1115 downloads
XML::DOM::Attr 1.44
XML::DOM::Attr is an XML attribute in XML::DOM. more>>
XML::DOM::Attr is an XML attribute in XML::DOM.
XML::DOM::Attr extends XML::DOM::Node.
The Attr nodes built by the XML::DOM::Parser always have one child node which is a Text node containing the expanded string value (i.e. EntityReferences are always expanded.) EntityReferences may be added when modifying or creating a new Document.
The Attr interface represents an attribute in an Element object. Typically the allowable values for the attribute are defined in a document type definition.
Attr objects inherit the Node interface, but since they are not actually child nodes of the element they describe, the DOM does not consider them part of the document tree. Thus, the Node attributes parentNode, previousSibling, and nextSibling have a undef value for Attr objects. The DOM takes the view that attributes are properties of elements rather than having a separate identity from the elements they are associated with; this should make it more efficient to implement such features as default attributes associated with all elements of a given type.
Furthermore, Attr nodes may not be immediate children of a DocumentFragment. However, they can be associated with Element nodes contained within a DocumentFragment. In short, users and implementors of the DOM need to be aware that Attr nodes have some things in common with other objects inheriting the Node interface, but they also are quite distinct.
The attributes effective value is determined as follows: if this attribute has been explicitly assigned any value, that value is the attributes effective value; otherwise, if there is a declaration for this attribute, and that declaration includes a default value, then that default value is the attributes effective value; otherwise, the attribute does not exist on this element in the structure model until it has been explicitly added. Note that the nodeValue attribute on the Attr instance can also be used to retrieve the string version of the attributes value(s).
In XML, where the value of an attribute can contain entity references, the child nodes of the Attr node provide a representation in which entity references are not expanded. These child nodes may be either Text or EntityReference nodes. Because the attribute type may be unknown, there are no tokenized attribute values.
<<lessXML::DOM::Attr extends XML::DOM::Node.
The Attr nodes built by the XML::DOM::Parser always have one child node which is a Text node containing the expanded string value (i.e. EntityReferences are always expanded.) EntityReferences may be added when modifying or creating a new Document.
The Attr interface represents an attribute in an Element object. Typically the allowable values for the attribute are defined in a document type definition.
Attr objects inherit the Node interface, but since they are not actually child nodes of the element they describe, the DOM does not consider them part of the document tree. Thus, the Node attributes parentNode, previousSibling, and nextSibling have a undef value for Attr objects. The DOM takes the view that attributes are properties of elements rather than having a separate identity from the elements they are associated with; this should make it more efficient to implement such features as default attributes associated with all elements of a given type.
Furthermore, Attr nodes may not be immediate children of a DocumentFragment. However, they can be associated with Element nodes contained within a DocumentFragment. In short, users and implementors of the DOM need to be aware that Attr nodes have some things in common with other objects inheriting the Node interface, but they also are quite distinct.
The attributes effective value is determined as follows: if this attribute has been explicitly assigned any value, that value is the attributes effective value; otherwise, if there is a declaration for this attribute, and that declaration includes a default value, then that default value is the attributes effective value; otherwise, the attribute does not exist on this element in the structure model until it has been explicitly added. Note that the nodeValue attribute on the Attr instance can also be used to retrieve the string version of the attributes value(s).
In XML, where the value of an attribute can contain entity references, the child nodes of the Attr node provide a representation in which entity references are not expanded. These child nodes may be either Text or EntityReference nodes. Because the attribute type may be unknown, there are no tokenized attribute values.
Download (0.11MB)
Added: 2006-07-20 License: GPL (GNU General Public License) Price:
1191 downloads
AxKit::XSP::ESQL 1.4
AxKit::XSP::ESQL is an Extended SQL taglib for AxKit eXtensible Server Pages. more>>
AxKit::XSP::ESQL is an Extended SQL taglib for AxKit eXtensible Server Pages.
SYNOPSIS
Add the esql: namespace to your XSP < xsp:page > tag:
< xsp:page
language="Perl"
xmlns:xsp="http://apache.org/xsp/core/v1"
xmlns:esql="http://apache.org/xsp/SQL/v2"
>
And add this taglib to AxKit (via httpd.conf or .htaccess):
AxAddXSPTaglib AxKit::XSP::ESQL
This tag library provides extensive support for executing SQL statements from within XSP. This tag library is the same as the Cocoon ESQL taglib.
TAG REFERENCE
Note that below we use the esql: prefix as a convention, however you can use whatever prefix you like provided it is mapped to the appropriate namespace.
< esql:connection>
parent: none
This is the required wrapper element that declares your connection.
< esql:driver>
parent: < esql:connection>
The contents of this element define the DBI driver to be used. For example, Pg, Sybase, Oracle.
You can also add an optional attribute: transactions=no to the driver element, to indicate that this driver does not support transactions (or just that you dont want to use transactions).
< esql:dburl>
parent: < esql:connection>
The name of this tag is a hang-over from the Cocoon (Java) version. In the AxKit version this is simply anything that goes after the driver in the connection string. So for PostgreSQL you might have in here dbname=axkit, to connect to the "axkit" database. The full connect string is constructed as follows:
"dbi:$driver" . ($dburl ? ":$dburl" : "")
See your DBD driver documentation for more details on what is valid for the connection string.
< esql:username>
parent: < esql:connection>
The username to connect to the database with.
< esql:password>
parent: < esql:connection>
The password to use to connect to the database.
< esql:execute-query>
parent: < esql:connection>
This tag is a wrapper tag around queries. You may have as many queries as you like within a single < esql:connection> tag.
< esql:skip-rows>
parent: < esql:execute-query>
The contents of this tag (which may be an < xsp:expr>) define a number of rows to skip forward in the result set.
< esql:max-rows>
parent: < esql:execute-query>
The maximum number of rows to return.
< esql:query>
parent: < esql:execute-query>
The contents of this tag define the query to be executed.
< esql:parameter>
parent: < esql:query>
This tag can be put in your SQL query everywhere you might put a ? in your SQL in DBI. ESQL is intelligent enough to create a cached statement when you do this, and only execute your code when necessary. You put an expression (or another taglib) within the parameter tag (see the example below).
< esql:results>
parent: < esql:execute-query>
The contents of this tag are "executed" whenever the query returns some results.
< esql:row-results>
parent: < esql:results>
The contents of this tag are "executed" for each row of the results
< esql:get-columns>
parent: < esql:row-results>
This tag gets all of the columns in the current row, and outputs them as < column_name>value< /column_name>. If you specify an attribute tag-case="upper", all columns are upper case. Alternatively, "lower" gives you all tags in lower case. An ancestor attribute is also allowed, see "Nested Results" below for more details.
get-*
parent: < esql:row-results>
These are:
get-column
get-string
get-boolean
get-double
get-float
get-int
get-long
get-short
(and more below)
Each of these takes either an attribute column="name", or a child tag, < esql:column> which gives the column name. Alternatively either the attribute or child element can be an integer (starting at 1) specifying the column number.
Also allowed is an ancestor attribute, which is an integer (default 0), which indicates how far up the nested results you go. See Nested Results below.
< esql:get-date>, < esql:get-time>, < esql:get-timestamp>
parent: < esql:row-results>
These tags are the same as get-* above, except they also take a format="..." attribute, which contains a strftime formatting string.
< esql:get-xml>
parent: < esql:row-results>
Again the same as get-* above. This tag assumes the contents of the column are valid XML, and appends that XML into the result tree.
< esql:get-row-position>
parent: < esql:row-results>
Gets the current row number. Optional ancestor attribute.
< esql:get-column-name>
parent: < esql:row-results>
Gets the column name indicated by the numbered column in the column="..." attribute, or the child < esql:column> element. The attribute/child can actually be a string (name), but then what is the point of that?
< esql:get-column-label>
parent: < esql:row-results>
Gets the label of the column. This is a hang-over from the Cocoon java implementation where sadly nobody seems to know what label is compared with name. In this case, get-column-name is always lower case, whereas get-column-label is returned in the case that the DBD driver returns it as.
< esql:get-column-type-name>
parent: < esql:row-results>
Returns the TYPE_NAME of the column indicated as other get-* elements. See the DBI docs for more details.
< esql:no-results>
parent: < esql:execute-query>
The contents of this element are executed when the SQL returned no rows.
< esql:update-results>
parent: < esql:execute-query>
The contents of this element are executed when the SQL was an update statement. The number of rows updated are in the $rv variable.
<<lessSYNOPSIS
Add the esql: namespace to your XSP < xsp:page > tag:
< xsp:page
language="Perl"
xmlns:xsp="http://apache.org/xsp/core/v1"
xmlns:esql="http://apache.org/xsp/SQL/v2"
>
And add this taglib to AxKit (via httpd.conf or .htaccess):
AxAddXSPTaglib AxKit::XSP::ESQL
This tag library provides extensive support for executing SQL statements from within XSP. This tag library is the same as the Cocoon ESQL taglib.
TAG REFERENCE
Note that below we use the esql: prefix as a convention, however you can use whatever prefix you like provided it is mapped to the appropriate namespace.
< esql:connection>
parent: none
This is the required wrapper element that declares your connection.
< esql:driver>
parent: < esql:connection>
The contents of this element define the DBI driver to be used. For example, Pg, Sybase, Oracle.
You can also add an optional attribute: transactions=no to the driver element, to indicate that this driver does not support transactions (or just that you dont want to use transactions).
< esql:dburl>
parent: < esql:connection>
The name of this tag is a hang-over from the Cocoon (Java) version. In the AxKit version this is simply anything that goes after the driver in the connection string. So for PostgreSQL you might have in here dbname=axkit, to connect to the "axkit" database. The full connect string is constructed as follows:
"dbi:$driver" . ($dburl ? ":$dburl" : "")
See your DBD driver documentation for more details on what is valid for the connection string.
< esql:username>
parent: < esql:connection>
The username to connect to the database with.
< esql:password>
parent: < esql:connection>
The password to use to connect to the database.
< esql:execute-query>
parent: < esql:connection>
This tag is a wrapper tag around queries. You may have as many queries as you like within a single < esql:connection> tag.
< esql:skip-rows>
parent: < esql:execute-query>
The contents of this tag (which may be an < xsp:expr>) define a number of rows to skip forward in the result set.
< esql:max-rows>
parent: < esql:execute-query>
The maximum number of rows to return.
< esql:query>
parent: < esql:execute-query>
The contents of this tag define the query to be executed.
< esql:parameter>
parent: < esql:query>
This tag can be put in your SQL query everywhere you might put a ? in your SQL in DBI. ESQL is intelligent enough to create a cached statement when you do this, and only execute your code when necessary. You put an expression (or another taglib) within the parameter tag (see the example below).
< esql:results>
parent: < esql:execute-query>
The contents of this tag are "executed" whenever the query returns some results.
< esql:row-results>
parent: < esql:results>
The contents of this tag are "executed" for each row of the results
< esql:get-columns>
parent: < esql:row-results>
This tag gets all of the columns in the current row, and outputs them as < column_name>value< /column_name>. If you specify an attribute tag-case="upper", all columns are upper case. Alternatively, "lower" gives you all tags in lower case. An ancestor attribute is also allowed, see "Nested Results" below for more details.
get-*
parent: < esql:row-results>
These are:
get-column
get-string
get-boolean
get-double
get-float
get-int
get-long
get-short
(and more below)
Each of these takes either an attribute column="name", or a child tag, < esql:column> which gives the column name. Alternatively either the attribute or child element can be an integer (starting at 1) specifying the column number.
Also allowed is an ancestor attribute, which is an integer (default 0), which indicates how far up the nested results you go. See Nested Results below.
< esql:get-date>, < esql:get-time>, < esql:get-timestamp>
parent: < esql:row-results>
These tags are the same as get-* above, except they also take a format="..." attribute, which contains a strftime formatting string.
< esql:get-xml>
parent: < esql:row-results>
Again the same as get-* above. This tag assumes the contents of the column are valid XML, and appends that XML into the result tree.
< esql:get-row-position>
parent: < esql:row-results>
Gets the current row number. Optional ancestor attribute.
< esql:get-column-name>
parent: < esql:row-results>
Gets the column name indicated by the numbered column in the column="..." attribute, or the child < esql:column> element. The attribute/child can actually be a string (name), but then what is the point of that?
< esql:get-column-label>
parent: < esql:row-results>
Gets the label of the column. This is a hang-over from the Cocoon java implementation where sadly nobody seems to know what label is compared with name. In this case, get-column-name is always lower case, whereas get-column-label is returned in the case that the DBD driver returns it as.
< esql:get-column-type-name>
parent: < esql:row-results>
Returns the TYPE_NAME of the column indicated as other get-* elements. See the DBI docs for more details.
< esql:no-results>
parent: < esql:execute-query>
The contents of this element are executed when the SQL returned no rows.
< esql:update-results>
parent: < esql:execute-query>
The contents of this element are executed when the SQL was an update statement. The number of rows updated are in the $rv variable.
Download (0.006MB)
Added: 2007-06-11 License: Perl Artistic License Price:
866 downloads
Bio::NEXUS::MatrixBlock 0.67
Bio::NEXUS::MatrixBlock is a Perl module that provides functions for handling blocks that have matrices. more>>
Bio::NEXUS::MatrixBlock is a Perl module that provides functions for handling blocks that have matrices.
SYNOPSIS
This module is the super class of Characters, Unaligned, and Distances block classes, and indirectly it is a super-class of Data and History blocks, which are both sub-classes of Characters blocks. These sub-classes inherint the methods within this module. There is no constructor, as a MatrixBlock should not exist that is not also one of the sub-class block types.
Provides functions used for handling blocks that have matrices.
METHODS
get_ntax
Title : get_ntax
Usage : $block->get_ntax();
Function: Returns the number of taxa in the block
Returns : # taxa
Args : none
get_nchar
Title : get_nchar
Usage : $block->get_nchar();
Function: Returns the number of characters in the block (Note: In Distances Blocks, this is the number of characters used to infer distances.)
Returns : # taxa
Args : none
set_format
Title : set_format
Usage : $block->set_format(%format);
Function: set the format of the characters
Returns : none
Args : hash of format values
get_format
Title : get_format
Usage : $block->get_format($attribute);
Function: Returns the format of the characters
Returns : hash of format values, or if $attribute (a string) is supplied, the value of that attribute in the hash
Args : none
add_taxlabels
Title : add_taxlabels
Usage : $block->add_taxlabels($new_taxlabels);
Function: Adds new taxa to taxlabels if they arent already there
Returns : none
Args : taxa to be added
<<lessSYNOPSIS
This module is the super class of Characters, Unaligned, and Distances block classes, and indirectly it is a super-class of Data and History blocks, which are both sub-classes of Characters blocks. These sub-classes inherint the methods within this module. There is no constructor, as a MatrixBlock should not exist that is not also one of the sub-class block types.
Provides functions used for handling blocks that have matrices.
METHODS
get_ntax
Title : get_ntax
Usage : $block->get_ntax();
Function: Returns the number of taxa in the block
Returns : # taxa
Args : none
get_nchar
Title : get_nchar
Usage : $block->get_nchar();
Function: Returns the number of characters in the block (Note: In Distances Blocks, this is the number of characters used to infer distances.)
Returns : # taxa
Args : none
set_format
Title : set_format
Usage : $block->set_format(%format);
Function: set the format of the characters
Returns : none
Args : hash of format values
get_format
Title : get_format
Usage : $block->get_format($attribute);
Function: Returns the format of the characters
Returns : hash of format values, or if $attribute (a string) is supplied, the value of that attribute in the hash
Args : none
add_taxlabels
Title : add_taxlabels
Usage : $block->add_taxlabels($new_taxlabels);
Function: Adds new taxa to taxlabels if they arent already there
Returns : none
Args : taxa to be added
Download (0.15MB)
Added: 2006-12-20 License: Perl Artistic License Price:
1038 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 attribute 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