type in
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 3748
MIME::Type 1.19
MIME::Type is a definition of one MIME type. more>>
MIME::Type is a definition of one MIME type.
SYNOPSIS
use MIME::Types;
my $mimetypes = MIME::Types->new;
my MIME::Type $plaintext = $mimetypes->type(text/plain);
print $plaintext->mediaType; # text
print $plaintext->subType; # plain
my @ext = $plaintext->extensions;
print "@ext" # txt asc c cc h hh cpp
print $plaintext->encoding # 8bit
if($plaintext->isBinary) # false
if($plaintext->isAscii) # true
if($plaintext->equals(text/plain) {...}
if($plaintext eq text/plain) # same
print MIME::Type->simplified(x-appl/x-zip) # appl/zip
MIME types are used in MIME entities, for instance as part of e-mail and HTTP traffic. Sometimes real knowledge about a mime-type is need. Objects of MIME::Type store the information on one such type.
This module is built to conform to the MIME types of RFCs 2045 and 2231. It follows the official IANA registry at http://www.iana.org/assignments/media-types/ and the collection kept at http://www.ltsw.se/knbase/internet/mime.htp
<<lessSYNOPSIS
use MIME::Types;
my $mimetypes = MIME::Types->new;
my MIME::Type $plaintext = $mimetypes->type(text/plain);
print $plaintext->mediaType; # text
print $plaintext->subType; # plain
my @ext = $plaintext->extensions;
print "@ext" # txt asc c cc h hh cpp
print $plaintext->encoding # 8bit
if($plaintext->isBinary) # false
if($plaintext->isAscii) # true
if($plaintext->equals(text/plain) {...}
if($plaintext eq text/plain) # same
print MIME::Type->simplified(x-appl/x-zip) # appl/zip
MIME types are used in MIME entities, for instance as part of e-mail and HTTP traffic. Sometimes real knowledge about a mime-type is need. Objects of MIME::Type store the information on one such type.
This module is built to conform to the MIME types of RFCs 2045 and 2231. It follows the official IANA registry at http://www.iana.org/assignments/media-types/ and the collection kept at http://www.ltsw.se/knbase/internet/mime.htp
Download (0.017MB)
Added: 2007-06-01 License: Perl Artistic License Price:
877 downloads
Hash::Type 1.05
Hash::Type module contains pseudo-hashes as arrays tied to a type (list of fields). more>>
Hash::Type module contains pseudo-hashes as arrays tied to a "type" (list of fields).
SYNOPSIS
use Hash::Type;
# create a Hash::Type
my $personType = new Hash::Type(qw(firstname lastname city));
# create and populate some hashes tied to $personType
tie %wolfgang, $personType, "wolfgang amadeus", "mozart", "salzburg";
$ludwig = new $personType ("ludwig", "van beethoven", "vienna");
$jsb = new $personType;
$jsb->{city} = "leipzig";
@{$jsb}{qw(firstname lastname)} = ("johann sebastian", "bach");
# add fields dynamically
$personType->add("birth", "death") or die "fields not added";
$wolfgang{birth} = 1750;
# More complete example : read a flat file with headers on first line
my ($headerline, @datalines) = map {chomp; $_} ;
my $ht = new Hash::Type(split /t/, $headerline);
foreach my $line (@datalines) {
my $data = new $ht(split /t/, $line);
work_with($data->{someField}, $data->{someOtherField});
}
# an alternative to Time::gmtime and Time::localtime
my $timeType = new Hash::Type qw(sec min hour mday mon year wday yday);
my $localtime = new $timeType (localtime);
my $gmtime = new $timeType (gmtime);
print $localtime->{hour} - $gmtime->{hour}, " hours difference to GMT";
# comparison functions
my $byAge = $personType->cmp("birth : -num, lastname, firstname");
my $byNameLength = $personType->cmp(lastname => {length($b) length($a)},
lastname => alpha,
firstname => alpha);
showPerson($_) foreach (sort $byAge @people);
showPerson($_) foreach (sort $byNameLength @people);
# special comparisons : dates
my $US_DateCmp = $myHashType->cmp("someDateField : m/d/y");
my $FR_InverseDateCmp = $myHashType->cmp("someDateField : -d.m.y");
<<lessSYNOPSIS
use Hash::Type;
# create a Hash::Type
my $personType = new Hash::Type(qw(firstname lastname city));
# create and populate some hashes tied to $personType
tie %wolfgang, $personType, "wolfgang amadeus", "mozart", "salzburg";
$ludwig = new $personType ("ludwig", "van beethoven", "vienna");
$jsb = new $personType;
$jsb->{city} = "leipzig";
@{$jsb}{qw(firstname lastname)} = ("johann sebastian", "bach");
# add fields dynamically
$personType->add("birth", "death") or die "fields not added";
$wolfgang{birth} = 1750;
# More complete example : read a flat file with headers on first line
my ($headerline, @datalines) = map {chomp; $_} ;
my $ht = new Hash::Type(split /t/, $headerline);
foreach my $line (@datalines) {
my $data = new $ht(split /t/, $line);
work_with($data->{someField}, $data->{someOtherField});
}
# an alternative to Time::gmtime and Time::localtime
my $timeType = new Hash::Type qw(sec min hour mday mon year wday yday);
my $localtime = new $timeType (localtime);
my $gmtime = new $timeType (gmtime);
print $localtime->{hour} - $gmtime->{hour}, " hours difference to GMT";
# comparison functions
my $byAge = $personType->cmp("birth : -num, lastname, firstname");
my $byNameLength = $personType->cmp(lastname => {length($b) length($a)},
lastname => alpha,
firstname => alpha);
showPerson($_) foreach (sort $byAge @people);
showPerson($_) foreach (sort $byNameLength @people);
# special comparisons : dates
my $US_DateCmp = $myHashType->cmp("someDateField : m/d/y");
my $FR_InverseDateCmp = $myHashType->cmp("someDateField : -d.m.y");
Download (0.008MB)
Added: 2007-08-06 License: Perl Artistic License Price:
813 downloads
File type determination 0.9
File type determination is a little KDE Service Menu that calls the GNU file command to retrieve Mime information from files. more>>
File type determination is a little KDE Service Menu that calls the GNU file command to retrieve Mime information from files, and presents it inside a standard KDE dialog.
<<less Download (MB)
Added: 2006-09-13 License: GPL (GNU General Public License) Price:
1138 downloads
Texplore 0.2
explore is a type explorer for GObject based libraries. more>>
Texplore is a type explorer for GObject based libraries. You can see what signals, properties, and other things are present in each type, its parents, and its children.
Its similar to System.Reflection.Emit from Mono, only it uses the GObject librarys API and introspection capabilites.
Installation:
./autogen.sh
./configure --prefix=/tmp
make
make install
$/tmp/bin/texplore & #yove done it
<<lessIts similar to System.Reflection.Emit from Mono, only it uses the GObject librarys API and introspection capabilites.
Installation:
./autogen.sh
./configure --prefix=/tmp
make
make install
$/tmp/bin/texplore & #yove done it
Download (0.16MB)
Added: 2005-07-06 License: GPL (GNU General Public License) Price:
1570 downloads
Data::Type 0.01.04
Data::Type is a Perl module with versatile data and value types. more>>
Data::Type is a Perl module with versatile data and value types.
SYNOPSIS
use Data::Type qw(:all);
use Error qw(:try);
try
{
verify $email , EMAIL;
verify $homepage , URI(http);
verify $cc , CREDITCARD( MASTERCARD, VISA );
verify $answer_a , YESNO;
verify $gender , GENDER;
verify one , ENUM( qw(one two three) );
verify [qw(two six)], SET( qw(one two three four five six) ) );
verify $server_ip4 , IP(v4);
verify $server_ip6 , IP(v6);
verify A35231AH1 , CINS;
verify 14565935 , ISSN;
verify DE , LANGCODE;
verify German , LANGNAME;
verify 012345678905, UPC();
verify 5276440065421319, CREDITCARD( MASTERCARD ) );
verify ATGCAAAT , BIO::DNA;
verify AUGGGAAAU , BIO::RNA;
verify 01001001110110101, BINARY;
verify 0F 0C 0A, HEX;
verify 0 , DEFINED;
verify 234 , NUM( 20 );
verify 1 , BOOL( true );
verify 100 , INT;
verify 1.1 , REAL;
my $foo = bless( 123, SomeThing );
verify $foo , REF;
verify $foo , REF( qw(SomeThing Else) );
verify [ bar ] , REF( ARRAY );
verify x 20 , VARCHAR( 20 );
verify 2001-01-01 , DATE( MYSQL );
verify 16 Nov 94 22:28:20 PST , DATE( DATEPARSE );
verify 9999-12-31 23:59:59, DATETIME;
verify 1970-01-01 00:00:00, TIMESTAMP;
verify -838:59:59 , TIME;
verify 2155 , YEAR;
verify 69 , YEAR(2);
verify 0 x 20 , TINYTEXT;
verify 0 x 20 , MEDIUMTEXT;
verify 0 x 20 , LONGTEXT;
verify 0 x 20 , TEXT;
verify 80 , PORT;
verify www.cpan.org, DOMAIN;
}
catch Type::Exception with
{
my $e = shift;
printf "Expected %s %s at %s line %sn",
$e->value,
$e->type->info,
$e->was_file,
$e->was_line;
foreach my $entry ( testplan( $e->type ) )
{
printf "texpecting it %s %s ", $entry->[1] ? is : is NOT, $entry->[0]->info();
}
};
# believe it or not, this really works
foreach ( EMAIL, WORD, CREDITCARD( MASTERCARD, VISA ), BIO::DNA, HEX )
{
print $_->info;
print $_->usage;
print $_->export; # does it have other names
print $_->param; # what are my choice i.e. [yes,no]
print $_->isa( IType::Business ); # is it a Business related type ?
print $_->VERSION; # first apperance in Data::Type release
}
# tied interface (alias typ)
try
{
typ ENUM( qw(DNA RNA) ), ( my $a, my $b );
print "a is typed" if istyp( $a );
$a = DNA; # $alias only accepts DNA or RNA
$a = RNA;
$a = xNA; # throws exception
untyp( $alias );
}
catch Type::Exception ::with
{
printf "Expected %s %s at %s line %sn",
$e->value,
$e->type->info,
$e->was_file,
$e->was_line;
};
dverify( $email, EMAIL ) or die $!;
my $g = Data::Type::Guard->new(
allow => [ Human, Others ], # blessed objects of that type
tests =>
{
email => EMAIL( 1 ), # mxcheck ON ! see Email::Valid
firstname => WORD,
social_id => [ NUM, VARCHAR( 10 ) ],
contacts => sub { my %args = @_; exists $args{lucy} },
}
);
$g->inspect( $h );
# compact version
overify { email => EMAIL( 1 ), firstname => WORD }, $object_a, $object_b;
print toc();
print catalog();
This module supports versatile data and value types. Out of the ordinary it supports parameterised types (like databases have i.e. VARCHAR(80) ). When you try to feed a typed variable against some odd data, this module explains what he would have expected.
<<lessSYNOPSIS
use Data::Type qw(:all);
use Error qw(:try);
try
{
verify $email , EMAIL;
verify $homepage , URI(http);
verify $cc , CREDITCARD( MASTERCARD, VISA );
verify $answer_a , YESNO;
verify $gender , GENDER;
verify one , ENUM( qw(one two three) );
verify [qw(two six)], SET( qw(one two three four five six) ) );
verify $server_ip4 , IP(v4);
verify $server_ip6 , IP(v6);
verify A35231AH1 , CINS;
verify 14565935 , ISSN;
verify DE , LANGCODE;
verify German , LANGNAME;
verify 012345678905, UPC();
verify 5276440065421319, CREDITCARD( MASTERCARD ) );
verify ATGCAAAT , BIO::DNA;
verify AUGGGAAAU , BIO::RNA;
verify 01001001110110101, BINARY;
verify 0F 0C 0A, HEX;
verify 0 , DEFINED;
verify 234 , NUM( 20 );
verify 1 , BOOL( true );
verify 100 , INT;
verify 1.1 , REAL;
my $foo = bless( 123, SomeThing );
verify $foo , REF;
verify $foo , REF( qw(SomeThing Else) );
verify [ bar ] , REF( ARRAY );
verify x 20 , VARCHAR( 20 );
verify 2001-01-01 , DATE( MYSQL );
verify 16 Nov 94 22:28:20 PST , DATE( DATEPARSE );
verify 9999-12-31 23:59:59, DATETIME;
verify 1970-01-01 00:00:00, TIMESTAMP;
verify -838:59:59 , TIME;
verify 2155 , YEAR;
verify 69 , YEAR(2);
verify 0 x 20 , TINYTEXT;
verify 0 x 20 , MEDIUMTEXT;
verify 0 x 20 , LONGTEXT;
verify 0 x 20 , TEXT;
verify 80 , PORT;
verify www.cpan.org, DOMAIN;
}
catch Type::Exception with
{
my $e = shift;
printf "Expected %s %s at %s line %sn",
$e->value,
$e->type->info,
$e->was_file,
$e->was_line;
foreach my $entry ( testplan( $e->type ) )
{
printf "texpecting it %s %s ", $entry->[1] ? is : is NOT, $entry->[0]->info();
}
};
# believe it or not, this really works
foreach ( EMAIL, WORD, CREDITCARD( MASTERCARD, VISA ), BIO::DNA, HEX )
{
print $_->info;
print $_->usage;
print $_->export; # does it have other names
print $_->param; # what are my choice i.e. [yes,no]
print $_->isa( IType::Business ); # is it a Business related type ?
print $_->VERSION; # first apperance in Data::Type release
}
# tied interface (alias typ)
try
{
typ ENUM( qw(DNA RNA) ), ( my $a, my $b );
print "a is typed" if istyp( $a );
$a = DNA; # $alias only accepts DNA or RNA
$a = RNA;
$a = xNA; # throws exception
untyp( $alias );
}
catch Type::Exception ::with
{
printf "Expected %s %s at %s line %sn",
$e->value,
$e->type->info,
$e->was_file,
$e->was_line;
};
dverify( $email, EMAIL ) or die $!;
my $g = Data::Type::Guard->new(
allow => [ Human, Others ], # blessed objects of that type
tests =>
{
email => EMAIL( 1 ), # mxcheck ON ! see Email::Valid
firstname => WORD,
social_id => [ NUM, VARCHAR( 10 ) ],
contacts => sub { my %args = @_; exists $args{lucy} },
}
);
$g->inspect( $h );
# compact version
overify { email => EMAIL( 1 ), firstname => WORD }, $object_a, $object_b;
print toc();
print catalog();
This module supports versatile data and value types. Out of the ordinary it supports parameterised types (like databases have i.e. VARCHAR(80) ). When you try to feed a typed variable against some odd data, this module explains what he would have expected.
Download (0.022MB)
Added: 2006-10-02 License: Perl Artistic License Price:
1117 downloads
Typing Trainer 1.0rc3
Typing Trainer is a software developed to exercise typing skills. more>>
Typing Trainer is a software developed to exercise typing skills.
Typing Trainer is designed for exercising typing speed and typing accuracy, by providing an environment to type in a copy of an original text within a specific time period.
It also has the ability to store the results of such an exercise for exam purposes.
Enhancements:
- Some bugfixes in unicode handling, primarily in the way results are displayed.
<<lessTyping Trainer is designed for exercising typing speed and typing accuracy, by providing an environment to type in a copy of an original text within a specific time period.
It also has the ability to store the results of such an exercise for exam purposes.
Enhancements:
- Some bugfixes in unicode handling, primarily in the way results are displayed.
Download (0.53MB)
Added: 2006-10-09 License: GPL (GNU General Public License) Price:
1119 downloads
Banihstypos 0.2
Banihstypos (yes, that is the name) is a simple game to teach you typing, FAST. more>>
Banihstypos (yes, that is the name) is a simple game to teach you typing, FAST.
The project helps you improve your typing by letting you type in a randomly selected word which scrolls by on the screen at an increasing speed. If the word hits the laser, youll loose points.
Enhancements:
- fixed a incorrect declared array
- the first word was always the same
- counting of correctly typed words was incorrect
<<lessThe project helps you improve your typing by letting you type in a randomly selected word which scrolls by on the screen at an increasing speed. If the word hits the laser, youll loose points.
Enhancements:
- fixed a incorrect declared array
- the first word was always the same
- counting of correctly typed words was incorrect
Download (0.009MB)
Added: 2007-05-30 License: GPL (GNU General Public License) Price:
879 downloads
Class::Meta::Type 0.53
Class::Meta::Type is a Perl module for data type validation and accessor building. more>>
Class::Meta::Type is a Perl module for data type validation and accessor building.
SYNOPSIS
package MyApp::TypeDef;
use strict;
use Class::Meta::Type;
use IO::Socket;
my $type = Class::Meta::Type->add( key => io_socket,
desc => IO::Socket object,
name => IO::Socket Object );
This class stores the various data types used by Class::Meta. It manages all aspects of data type validation and method creation. New data types can be added to Class::Meta::Type by means of the add() constructor. This is useful for creating custom types for your Class::Meta-built classes.
Note:This class manages the most advanced features of Class::Meta. Before deciding to create your own accessor closures as described in add(), you should have a thorough working knowledge of how Class::Meta works, and have studied the add() method carefully. Simple data type definitions such as that shown in the SYNOPSIS, on the other hand, are encouraged.
<<lessSYNOPSIS
package MyApp::TypeDef;
use strict;
use Class::Meta::Type;
use IO::Socket;
my $type = Class::Meta::Type->add( key => io_socket,
desc => IO::Socket object,
name => IO::Socket Object );
This class stores the various data types used by Class::Meta. It manages all aspects of data type validation and method creation. New data types can be added to Class::Meta::Type by means of the add() constructor. This is useful for creating custom types for your Class::Meta-built classes.
Note:This class manages the most advanced features of Class::Meta. Before deciding to create your own accessor closures as described in add(), you should have a thorough working knowledge of how Class::Meta works, and have studied the add() method carefully. Simple data type definitions such as that shown in the SYNOPSIS, on the other hand, are encouraged.
Download (0.060MB)
Added: 2006-09-22 License: Perl Artistic License Price:
1127 downloads
Audio::File::Type 0.10
Audio::File::Type represents an audio filetype. more>>
Audio::File::Type represents an audio filetype.
An instance of an object inherited from Audio::File::Type is returned by the constructor of Audio::File. This object currently provides access to the audio files information like its audio properties (bitrate, sample rate, number of channels, ...) and the data stored in the files tag, but also providing access to the raw audio data and other information should be easy to be implemented.
METHODS
new
Constructor. In fact you dont need to use it. Please use Audio::File which will call the appropriate constructor corresponding to the files type.
init
This method will be called by the constructor. Its empty by default and should be overwritten by inheriting subclasses to initialize themselfes.
name
Returns the name of the audio file.
is_readable
Checks whether the file is readable or not. At the moment its only used by the constructor, but it will be more usefull with later versions of Audio::File.
is_writeable
Checks whether the file is writeable or not. At the moment youll probably dont need to call this method, but itll be more usefull as soon as changing the audio file is implemented.
tag
Returns a reference to the files tag object. See the documentation of Audio::File::Tag to learn about what the tag object does.
audio_properties
Returns a reference to the files audio properties object. See the documentation of Audio::File::AudioProperties to get information about what the audio properties object does.
save
Saves the audio file. This is not yet implemented but it should remember me to do it at some time..
type
Returns the files type.
<<lessAn instance of an object inherited from Audio::File::Type is returned by the constructor of Audio::File. This object currently provides access to the audio files information like its audio properties (bitrate, sample rate, number of channels, ...) and the data stored in the files tag, but also providing access to the raw audio data and other information should be easy to be implemented.
METHODS
new
Constructor. In fact you dont need to use it. Please use Audio::File which will call the appropriate constructor corresponding to the files type.
init
This method will be called by the constructor. Its empty by default and should be overwritten by inheriting subclasses to initialize themselfes.
name
Returns the name of the audio file.
is_readable
Checks whether the file is readable or not. At the moment its only used by the constructor, but it will be more usefull with later versions of Audio::File.
is_writeable
Checks whether the file is writeable or not. At the moment youll probably dont need to call this method, but itll be more usefull as soon as changing the audio file is implemented.
tag
Returns a reference to the files tag object. See the documentation of Audio::File::Tag to learn about what the tag object does.
audio_properties
Returns a reference to the files audio properties object. See the documentation of Audio::File::AudioProperties to get information about what the audio properties object does.
save
Saves the audio file. This is not yet implemented but it should remember me to do it at some time..
type
Returns the files type.
Download (0.073MB)
Added: 2006-06-19 License: Perl Artistic License Price:
1222 downloads
HTTP Server type 1.2.3
httptype is a program that returns the http host software of a website. more>>
httptype is a program that returns the http host software of a website. It is written in Perl.
httptype reads a list of http hosts and optionally the port number for each of these. It queries each host, displaying the type of HTTP server running on that host. It reads the http_proxy and no_proxy environment variables to determine whether to use a proxy or not.
httptype reads a list of http servers and, optionally, the port number for each of these. It then queries each of the hosts and displays the HTTP server software of the host.
Input may be read from a host file if specified using the --hosts switch:
httptype --hosts [hostfile]
If hostfile is omitted or `-, httptype reads from standard input. See Format of host file for more info.
A single host may be queried by passing its name on the command line:
httptype host [port]
If port is omitted, 80 is used.
If no host file is specified through the --hosts file and no host is specified on the command line, httptype will read the list from standard input. See Format of host file for more info.
httptype will read the http_proxy environment variable and try to determine if a proxy server is being used. This setting may be overridden using the --proxy switch:
httptype --proxy proxyhost[:proxyport]
If proxyport is omitted, 80 is used.
If the proxy server is `none, no proxy is used. This is typically used to prevent httptype from using the proxy server specified by http_proxy. The --noproxy switch can be used to achieve the same.
Additionally, you may use the no_proxy environment variable to specify a comma delimited list of hosts for which httptype should not use the proxy. If httptype comes across any of these hosts, it will make a direct connection to them.
Enhancements:
- made 1.3.8 stable and renamed to 1.2.3
<<lesshttptype reads a list of http hosts and optionally the port number for each of these. It queries each host, displaying the type of HTTP server running on that host. It reads the http_proxy and no_proxy environment variables to determine whether to use a proxy or not.
httptype reads a list of http servers and, optionally, the port number for each of these. It then queries each of the hosts and displays the HTTP server software of the host.
Input may be read from a host file if specified using the --hosts switch:
httptype --hosts [hostfile]
If hostfile is omitted or `-, httptype reads from standard input. See Format of host file for more info.
A single host may be queried by passing its name on the command line:
httptype host [port]
If port is omitted, 80 is used.
If no host file is specified through the --hosts file and no host is specified on the command line, httptype will read the list from standard input. See Format of host file for more info.
httptype will read the http_proxy environment variable and try to determine if a proxy server is being used. This setting may be overridden using the --proxy switch:
httptype --proxy proxyhost[:proxyport]
If proxyport is omitted, 80 is used.
If the proxy server is `none, no proxy is used. This is typically used to prevent httptype from using the proxy server specified by http_proxy. The --noproxy switch can be used to achieve the same.
Additionally, you may use the no_proxy environment variable to specify a comma delimited list of hosts for which httptype should not use the proxy. If httptype comes across any of these hosts, it will make a direct connection to them.
Enhancements:
- made 1.3.8 stable and renamed to 1.2.3
Download (0.014MB)
Added: 2006-07-11 License: GPL (GNU General Public License) Price:
1203 downloads
Tangram::Type::Extending 2.10
Tangram::Type::Extending is a Perl module for teaching Tangram about new types. more>>
Tangram::Type::Extending is a Perl module for teaching Tangram about new types.
Tangram::Type is the root of a hierarchy of classes that are responsible mapping individual field to SQL entities (columns in the simplest cases). There is one Type object per persistent field.
Adding support for new types amounts to adding subclasses to Tangram::Type.
WRITING NEW TYPES
Tangram is organized in several subsystems, described below.
Schema is the repository for information about all the persistent aspects of a system: classes, inheritance relationships, fields, etc. It also contains graph-traversal algorithms, which are not currently documented.
Storage deals with objects as a whole: insertion, updating, multiple load detection, cycle handling, transactions, connections. It also serves as an entry point in the system. Storage does not manipulate fields directly.
Cursor deals with polymorphic retrieval of objects. It builds SELECT statements on the basis of the information in the hash. Cursor does not manipulate fields directly either.
The Type hierarchy deals with individual fields, and not with entire objects. More about it in a moment.
The Expr hierarchy deals with entities on the remote side; this includes expressions proper, Filters and Remotes.
Types are responsible for performing the mapping between a field of a given Perl type and a relational entity. The simplest Types merely transfer between one Perl field and one column. Sometimes it makes sense to have several mappings (and hence several Types) for the same Perl type; for example, Perl arrays can be mapped either using a link table, or one or several columns that live on the elements table.
Users dont deal with Type objects directly: they indicate that a series of fields should be mapped in a certain way by putting the fields under a given typetag in the field hash. The type registers itself with Tangram by adding a typetag in the %Tangram::Schema::TYPES hash. The value is the Type object. Up to now all Types have been singletons, but this is not a rule.
Anybody whos planning to write new Types should examine Scalar.pm first. It contains very simple mappings between one field and one column.
A Type must implement the methods described below. Keep the following facts in mind while reading further:
1. A Type is responsible for transfering all the *direct* fields for a given *class*. This excludes inherited fields. OTOH, the same Type can be called more than once for the same object, because the same Type may be used in several classes that appear in a particular objects inheritance graph.
<<lessTangram::Type is the root of a hierarchy of classes that are responsible mapping individual field to SQL entities (columns in the simplest cases). There is one Type object per persistent field.
Adding support for new types amounts to adding subclasses to Tangram::Type.
WRITING NEW TYPES
Tangram is organized in several subsystems, described below.
Schema is the repository for information about all the persistent aspects of a system: classes, inheritance relationships, fields, etc. It also contains graph-traversal algorithms, which are not currently documented.
Storage deals with objects as a whole: insertion, updating, multiple load detection, cycle handling, transactions, connections. It also serves as an entry point in the system. Storage does not manipulate fields directly.
Cursor deals with polymorphic retrieval of objects. It builds SELECT statements on the basis of the information in the hash. Cursor does not manipulate fields directly either.
The Type hierarchy deals with individual fields, and not with entire objects. More about it in a moment.
The Expr hierarchy deals with entities on the remote side; this includes expressions proper, Filters and Remotes.
Types are responsible for performing the mapping between a field of a given Perl type and a relational entity. The simplest Types merely transfer between one Perl field and one column. Sometimes it makes sense to have several mappings (and hence several Types) for the same Perl type; for example, Perl arrays can be mapped either using a link table, or one or several columns that live on the elements table.
Users dont deal with Type objects directly: they indicate that a series of fields should be mapped in a certain way by putting the fields under a given typetag in the field hash. The type registers itself with Tangram by adding a typetag in the %Tangram::Schema::TYPES hash. The value is the Type object. Up to now all Types have been singletons, but this is not a rule.
Anybody whos planning to write new Types should examine Scalar.pm first. It contains very simple mappings between one field and one column.
A Type must implement the methods described below. Keep the following facts in mind while reading further:
1. A Type is responsible for transfering all the *direct* fields for a given *class*. This excludes inherited fields. OTOH, the same Type can be called more than once for the same object, because the same Type may be used in several classes that appear in a particular objects inheritance graph.
Download (0.15MB)
Added: 2006-09-22 License: Perl Artistic License Price:
1128 downloads
Data::Type::Docs 0.01.15
Data::Type::Docs is a Perl module with the manual overview. more>>
Data::Type::Docs is a Perl module with the manual overview.
MANUALS
Data::Type::Docs::FAQ
Frequently asked questions.
Data::Type::Docs::FOP
Frequently occuring problems.
Data::Type::Docs::Howto
Point to point recipes how to get things done.
Data::Type::Docs::RFC
Exact API description. Startpoint for datatype developers.
NAVIGATION
First read the following paragraphs and then you may start study the Data::Type API.
<<lessMANUALS
Data::Type::Docs::FAQ
Frequently asked questions.
Data::Type::Docs::FOP
Frequently occuring problems.
Data::Type::Docs::Howto
Point to point recipes how to get things done.
Data::Type::Docs::RFC
Exact API description. Startpoint for datatype developers.
NAVIGATION
First read the following paragraphs and then you may start study the Data::Type API.
Download (0.069MB)
Added: 2006-10-12 License: Perl Artistic License Price:
1107 downloads
File::Type::Builder 0.22
File::Type::Builder is Perl module to parse mime-magic and generate code. more>>
File::Type::Builder is Perl module to parse mime-magic and generate code.
SYNOPSIS
my $build = File::Type::Builder->new();
while ( ) {
chomp;
my $parsed = $build->parse_magic($_);
my $code = $build->string_start($parsed);
(or string_offset or beshort)
}
Reads in the mime-magic file format and translates it to code. (This documentation would be longer if I really expected anyone other than me to run the code.)
<<lessSYNOPSIS
my $build = File::Type::Builder->new();
while ( ) {
chomp;
my $parsed = $build->parse_magic($_);
my $code = $build->string_start($parsed);
(or string_offset or beshort)
}
Reads in the mime-magic file format and translates it to code. (This documentation would be longer if I really expected anyone other than me to run the code.)
Download (0.15MB)
Added: 2006-11-17 License: Perl Artistic License Price:
1071 downloads
Force Content-Type 1.2.1
Force Content-Type is an extension used to force the Content-Type of URLs. more>>
Force Content-Type is an extension used to force the Content-Type of URLs.
Its useful to avoid the tag soup when you are developing a XHTML webpage and want Firefox to use its internal XML parser. If the webserver is not correctly configured, it will serve the page with a text/html Content-Type (a tag soup), instead of sending it as application/xhtml+xml, and therefore avoiding Firefox to treat the page as pure XML.
Force Content-Type allows you to define the Content-Type of some URLs (using Regular Expressions), overriding the webservers incorrect Content-Type.
Supported locales:
- Basque
- English
- Spanish
<<lessIts useful to avoid the tag soup when you are developing a XHTML webpage and want Firefox to use its internal XML parser. If the webserver is not correctly configured, it will serve the page with a text/html Content-Type (a tag soup), instead of sending it as application/xhtml+xml, and therefore avoiding Firefox to treat the page as pure XML.
Force Content-Type allows you to define the Content-Type of some URLs (using Regular Expressions), overriding the webservers incorrect Content-Type.
Supported locales:
- Basque
- English
- Spanish
Download (0.035MB)
Added: 2007-04-03 License: MPL (Mozilla Public License) Price:
951 downloads
ICMPInfo 0.2
ICMPInfo is a tool that uses ICMP type 13 and 17 to retrieve the current time of a remote host and its netmask. more>>
ICMPInfo is a tool that uses ICMP type 13 and 17 to retrieve the current time of a remote host and its netmask.
<<less Download (0.017MB)
Added: 2006-04-18 License: GPL (GNU General Public License) Price:
1284 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 type in 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