return
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 1873
Return-RST 1.1
Return-RST is a firewalling tool for Linux 2.2.xx systems using IPCHAINS. more>>
Return-RST is a firewalling tool for Linux 2.2.xx systems using IPCHAINS. It uses the netlink device to capture packets and sends TCP RST packets in response to TCP connection requests.
Normal IPCHAINS only allows you to drop packets, or reject packets with an ICMP error message. With Return-RST, you can make it look like there is no server listening, rather than giving away that theyre being filtered to the attacker.
Return-RST was written to overcome the lack of an ipchains policy that can return a RESET packet when denying a TCP connection. The DENY policy just drops the packet, and the REJECT policy sends back an ICMP message. Either policy will pull an attacker off to the fact theyre being filtered.
On the other hand, an RST in response to a TCP SYN packet is what happens when there is no server listening on a port - this program allows you to return this error, so attackers will think that there is no server available.
<<lessNormal IPCHAINS only allows you to drop packets, or reject packets with an ICMP error message. With Return-RST, you can make it look like there is no server listening, rather than giving away that theyre being filtered to the attacker.
Return-RST was written to overcome the lack of an ipchains policy that can return a RESET packet when denying a TCP connection. The DENY policy just drops the packet, and the REJECT policy sends back an ICMP message. Either policy will pull an attacker off to the fact theyre being filtered.
On the other hand, an RST in response to a TCP SYN packet is what happens when there is no server listening on a port - this program allows you to return this error, so attackers will think that there is no server available.
Download (0.013MB)
Added: 2006-07-13 License: GPL (GNU General Public License) Price:
1199 downloads
Contextual::Return 0.1.0
Contextual::Return is a Perl module to create context-senstive return values. more>>
Contextual::Return is a Perl module to create context-senstive return values.
SYNOPSIS
use Contextual::Return;
use Carp;
sub foo {
return
SCALAR { thirty-twelve }
BOOL { 1 }
NUM { 7*6 }
STR { forty-two }
LIST { 1,2,3 }
HASHREF { {name => foo, value => 99} }
ARRAYREF { [3,2,1] }
GLOBREF { *STDOUT }
CODEREF { croak "Dont use this result as code!"; }
;
}
# and later...
if (my $foo = foo()) {
for my $count (1..$foo) {
print "$count: $foo is:n"
. " array: @{$foo}n"
. " hash: $foo->{name} => $foo->{value}n"
;
}
print {$foo} $foo->();
}
Usually, when you need to create a subroutine that returns different values in different contexts (list, scalar, or void), you write something like:
sub get_server_status {
my ($server_ID) = @_;
# Acquire server data somehow...
my %server_data = _ascertain_server_status($server_ID);
# Return different components of that data,
# depending on call context...
if (wantarray()) {
return @server_data{ qw(name uptime load users) };
}
if (defined wantarray()) {
return $server_data{load};
}
if (!defined wantarray()) {
carp Useless use of get_server_status() in void context;
return;
}
else {
croak q{Bad context! No biscuit!};
}
}
That works okay, but the code could certainly be more readable. In its simplest usage, this module makes that code more readable by providing three subroutines--LIST(), SCALAR(), VOID()--that are true only when the current subroutine is called in the corresponding context:
use Contextual::Return;
sub get_server_status {
my ($server_ID) = @_;
# Acquire server data somehow...
my %server_data = _ascertain_server_status($server_ID);
# Return different components of that data
# depending on call context...
if (LIST) { return @server_data{ qw(name uptime load users) } }
if (SCALAR) { return $server_data{load} }
if (VOID) { print "$server_data{load}n" }
else { croak q{Bad context! No biscuit!} }
}
Contextual returns
Those three subroutines can also be used in another way: as labels on a series of contextual return blocks (collectively known as a context sequence). When a context sequence is returned, it automatically selects the appropriate contextual return block for the calling context. So the previous example could be written even more cleanly as:
use Contextual::Return;
sub get_server_status {
my ($server_ID) = @_;
# Acquire server data somehow...
my %server_data = _ascertain_server_status($server_ID);
# Return different components of that data
# depending on call context...
return (
LIST { return @server_data{ qw(name uptime load users) } }
SCALAR { return $server_data{load} }
VOID { print "$server_data{load}n" }
DEFAULT { croak q{Bad context! No biscuit!} }
);
}
The context sequence automatically selects the appropriate block for each call context.
<<lessSYNOPSIS
use Contextual::Return;
use Carp;
sub foo {
return
SCALAR { thirty-twelve }
BOOL { 1 }
NUM { 7*6 }
STR { forty-two }
LIST { 1,2,3 }
HASHREF { {name => foo, value => 99} }
ARRAYREF { [3,2,1] }
GLOBREF { *STDOUT }
CODEREF { croak "Dont use this result as code!"; }
;
}
# and later...
if (my $foo = foo()) {
for my $count (1..$foo) {
print "$count: $foo is:n"
. " array: @{$foo}n"
. " hash: $foo->{name} => $foo->{value}n"
;
}
print {$foo} $foo->();
}
Usually, when you need to create a subroutine that returns different values in different contexts (list, scalar, or void), you write something like:
sub get_server_status {
my ($server_ID) = @_;
# Acquire server data somehow...
my %server_data = _ascertain_server_status($server_ID);
# Return different components of that data,
# depending on call context...
if (wantarray()) {
return @server_data{ qw(name uptime load users) };
}
if (defined wantarray()) {
return $server_data{load};
}
if (!defined wantarray()) {
carp Useless use of get_server_status() in void context;
return;
}
else {
croak q{Bad context! No biscuit!};
}
}
That works okay, but the code could certainly be more readable. In its simplest usage, this module makes that code more readable by providing three subroutines--LIST(), SCALAR(), VOID()--that are true only when the current subroutine is called in the corresponding context:
use Contextual::Return;
sub get_server_status {
my ($server_ID) = @_;
# Acquire server data somehow...
my %server_data = _ascertain_server_status($server_ID);
# Return different components of that data
# depending on call context...
if (LIST) { return @server_data{ qw(name uptime load users) } }
if (SCALAR) { return $server_data{load} }
if (VOID) { print "$server_data{load}n" }
else { croak q{Bad context! No biscuit!} }
}
Contextual returns
Those three subroutines can also be used in another way: as labels on a series of contextual return blocks (collectively known as a context sequence). When a context sequence is returned, it automatically selects the appropriate contextual return block for the calling context. So the previous example could be written even more cleanly as:
use Contextual::Return;
sub get_server_status {
my ($server_ID) = @_;
# Acquire server data somehow...
my %server_data = _ascertain_server_status($server_ID);
# Return different components of that data
# depending on call context...
return (
LIST { return @server_data{ qw(name uptime load users) } }
SCALAR { return $server_data{load} }
VOID { print "$server_data{load}n" }
DEFAULT { croak q{Bad context! No biscuit!} }
);
}
The context sequence automatically selects the appropriate block for each call context.
Download (0.022MB)
Added: 2007-01-18 License: Perl Artistic License Price:
1009 downloads
Contextual::Return::Failure 0.1.0
Contextual::Return::Failure is a Perl module with a utility module for Contextual::Return. more>>
Contextual::Return::Failure is a Perl module with a utility module for Contextual::Return.
NOTE
Contains no user serviceable parts. See Contextual::Return instead.
<<lessNOTE
Contains no user serviceable parts. See Contextual::Return instead.
Download (0.022MB)
Added: 2007-01-17 License: Perl Artistic License Price:
1010 downloads
Oracle::Trace 1.06
Oracle::Trace is a Perl Module for parsing Oracle Trace files. more>>
Oracle::Trace is a Perl Module for parsing Oracle Trace files.
SYNOPSIS
use Oracle::Trace;
print Oracle::Trace->new($tracefilename)->parse->test_report;
Currently the parsing and statistics are very rudimentary, and in certain matters may be fundamentally flawed - you have been warned! Expect this to improve as further development takes place.
new
Create a new object for a given Orace Trace file.
my $o_trc = Oracle::Trace->new($tracefile);
init
Initialise the object (check the tracefile).
$o_trc->init.
opentracefile
Perform basic exists/read/etc. checks on given tracefile.
Returns object or undef.
$o_trc = $o_trc->checkfile($tfile);
header
Return the Header object.
my $o_hdr = $o_trc->header;
entries
Return Entry objects which comply with given regex criteria.
my @o_ents = $o_trc->entries(type=>EXEC #d+, key=>dep, value=>0);
oids
Return the unique object ids for the currently known Entryies
my @oids = $o_trc->oids;
footer
Return the Footer object
my $o_ftr = $o_trc->footer;
test_report
Return a simple test_report of the current object.
print $o_trc->test_report(string);
mini_report
Return a simple string of descending order timings for the statements retrieved from the given objects.
my $s_str = $o_trc->mini_report($i_max, @o_objs);
Note that we use microsecond resolution for Oracle 9i and above and centisecond resolution otherwise
<<lessSYNOPSIS
use Oracle::Trace;
print Oracle::Trace->new($tracefilename)->parse->test_report;
Currently the parsing and statistics are very rudimentary, and in certain matters may be fundamentally flawed - you have been warned! Expect this to improve as further development takes place.
new
Create a new object for a given Orace Trace file.
my $o_trc = Oracle::Trace->new($tracefile);
init
Initialise the object (check the tracefile).
$o_trc->init.
opentracefile
Perform basic exists/read/etc. checks on given tracefile.
Returns object or undef.
$o_trc = $o_trc->checkfile($tfile);
header
Return the Header object.
my $o_hdr = $o_trc->header;
entries
Return Entry objects which comply with given regex criteria.
my @o_ents = $o_trc->entries(type=>EXEC #d+, key=>dep, value=>0);
oids
Return the unique object ids for the currently known Entryies
my @oids = $o_trc->oids;
footer
Return the Footer object
my $o_ftr = $o_trc->footer;
test_report
Return a simple test_report of the current object.
print $o_trc->test_report(string);
mini_report
Return a simple string of descending order timings for the statements retrieved from the given objects.
my $s_str = $o_trc->mini_report($i_max, @o_objs);
Note that we use microsecond resolution for Oracle 9i and above and centisecond resolution otherwise
Download (0.011MB)
Added: 2007-04-25 License: Perl Artistic License Price:
551 downloads
SuperBunguru 0.5
SuperBunguru is a 2d platform/arcade game. more>>
SuperBunguru is a 2d platform/arcade game.
SuperBunguru is a arcade game where your objective is jump from block to block to reach a goal at the top of a level.
To make this hard you cant return to a previous lower position. And to turn up the pace of the game blocks collapps when you stand on them too long.
SuperBunguru is inspired by Bunguru-Wa.
<<lessSuperBunguru is a arcade game where your objective is jump from block to block to reach a goal at the top of a level.
To make this hard you cant return to a previous lower position. And to turn up the pace of the game blocks collapps when you stand on them too long.
SuperBunguru is inspired by Bunguru-Wa.
Download (0.90MB)
Added: 2006-07-05 License: GPL (GNU General Public License) Price:
1210 downloads
Text::Roman 3.01
Text::Roman is a Perl module that converts roman algarism in integer numbers and the contrary, recognize algarisms. more>>
Text::Roman is a Perl module that converts roman algarism in integer numbers and the contrary, recognize algarisms.
SYNOPSIS
use Text::Roman;
print roman(123);
Text::Roman::roman() is a very simple algarism converter. It converts a single integer (in arabic algarisms) at a time to its roman correspondent. The conventional roman numbers goes from 1 up to 3999. MROMANS (milhar romans) range is 1 up to 3999*1000+3999=4002999.
Up to these number we will found symbols as:??????but they do not concern this specific package. There is no concern for mix cases, like Xv, XiiI, as legal roman algarism numbers.
roman($int): return string containing the roman corresponding to the given integer, or if the integer is out of domain...
roman2int($str): return if $str is not roman or return integer if it is.
isroman($str): verify whether the given string is a conventional roman number, if it is return 1; if it is not return 0...
Quite same follows for mroman2int($str) and ismroman($str), except that these functions treat milhar romans.
<<lessSYNOPSIS
use Text::Roman;
print roman(123);
Text::Roman::roman() is a very simple algarism converter. It converts a single integer (in arabic algarisms) at a time to its roman correspondent. The conventional roman numbers goes from 1 up to 3999. MROMANS (milhar romans) range is 1 up to 3999*1000+3999=4002999.
Up to these number we will found symbols as:??????but they do not concern this specific package. There is no concern for mix cases, like Xv, XiiI, as legal roman algarism numbers.
roman($int): return string containing the roman corresponding to the given integer, or if the integer is out of domain...
roman2int($str): return if $str is not roman or return integer if it is.
isroman($str): verify whether the given string is a conventional roman number, if it is return 1; if it is not return 0...
Quite same follows for mroman2int($str) and ismroman($str), except that these functions treat milhar romans.
Download (0.003MB)
Added: 2007-07-27 License: Perl Artistic License Price:
821 downloads
beware 0.1
beware project is a distributed global server load balancing system. more>>
beware project is a distributed global server load balancing system.
beware is a small DNS server that can have nameserver responsibility delegated to it and that can return a set of authoritative "IN A" records to a client.
Given a list of hosts for a certain domain name, it also tests for services specified and will only return IP addresses for currently reachable services.
<<lessbeware is a small DNS server that can have nameserver responsibility delegated to it and that can return a set of authoritative "IN A" records to a client.
Given a list of hosts for a certain domain name, it also tests for services specified and will only return IP addresses for currently reachable services.
Download (0.12MB)
Added: 2007-04-14 License: GPL (GNU General Public License) Price:
923 downloads
Subnet Mask Calculator 0.2
Subnet Mask Calculator is a simple PHP script that will return the subnet mask and slash-notated mask for a given number of host more>>
Subnet Mask Calculator is a simple PHP script that will return the subnet mask and slash-notated mask for a given number of hosts.
Subnet Mask Calculators purpose of this program is to help people calculate subnets for networks based on the number of hosts (computers).
Installation:
Step 1 - copy subnetmaskcalculator.php into a directory accessible from your web server (/var/www/html/ for example).
Step 2 - Visit http://yourhost.domain.tld/subnetmaskcalculator.php
Step 3 - Enjoy
If you have any trouble, support can be obtained by posts to http://www.vle.org/vle
Enhancements:
- This release changes URL GET from HTTP_GET_VARS to _GET.
<<lessSubnet Mask Calculators purpose of this program is to help people calculate subnets for networks based on the number of hosts (computers).
Installation:
Step 1 - copy subnetmaskcalculator.php into a directory accessible from your web server (/var/www/html/ for example).
Step 2 - Visit http://yourhost.domain.tld/subnetmaskcalculator.php
Step 3 - Enjoy
If you have any trouble, support can be obtained by posts to http://www.vle.org/vle
Enhancements:
- This release changes URL GET from HTTP_GET_VARS to _GET.
Download (0.030MB)
Added: 2006-08-05 License: GPL (GNU General Public License) Price:
1221 downloads
Class::Driver 0.005
Class::Driver is a Perl module to generate driver (composite) class hierarchies on-the-fly. more>>
EXAMPLE
# This is a really long synopsis, but hopefully it will give you an idea...
package MyPackage;
use Class::Driver;
use base q(Class::Driver);
our %drivers;
return 1;
sub new {
my($class, %args) = @_;
die "mime_type is required" unless($args{mime_type});
die "no driver to handle type $args{mime_type}"
unless($drivers{$args{mime_type}});
return $class->driver_load($drivers{$args{mime_type}}, %args);
}
sub driver_new {
my($class, %args) = @_;
return bless %args, $class;
}
sub driver_required { 1; }
sub driver_requied_here { 0; }
package MyPackage::avi;
use MyPackage;
use base q(MyPackage);
use Video::Info;
$MyPackage::drivers{video/x-msvideo} = avi;
return 1;
sub driver { "avi"; }
sub driver_new {
my($class, %args) = @_;
die "file is a required parameter for $args{mime_type} files"
unless($args{file});
$args{info} = Video::Info->new(-file => $args{file})
or die "Failed to create a Video::Info object for $args{file}";
return $class->SUPER::driver_new(%args);
}
sub duration {
my $self = shift;
return $args{info}->duration;
}
package MyPackage::mp3;
use base q(MyPackage);
use MP3::Info;
$MyPackage::drivers{audio/mpeg} = mp3;
## (etc...)
package main;
my $foo = MyPackage->new(file => foobar.mp3, mime_type => audio/mpeg);
print "foobar.mp3 is ", $foo->duration, " seconds long.n";
Download (0.011MB)
Added: 2006-11-14 License: Perl Artistic License Price:
1075 downloads
Algorithm::SocialNetwork 0.07
Algorithm::SocialNetwork is a social network analysis. more>>
Algorithm::SocialNetwork is a social network analysis.
SYNOPSIS
use Graph::Undirected;
use Algorithm::SocialNetwork;
my $G = Graph::Undirected->new();
$G->add_edges([qw(a b)], [qw(b c)]);
my $algo = Algorithm::SocialNetwork->new(graph => $G3);
my $BC = $algo->BetweenessCentrality();
# $BC->{a} is 0
# $BC->{b} is 2
# $BC->{c} is 0
METHODS
So far this module implement the algorithm provided in [1]. More handy algorithm would be included in the future.
This module is a Spiffy module, methods provided as "field" are marked.
new([graph => $G])
Object constructor, an optional graph parameter could be passed in to specify the network graph to be analyzed.
graph([$G]) [Spiffy field]
Without arguments, this method return the current Graph object.
BetweenessCentrality([$vertex])
The implementation of algorithm provided in [1], if an optional parameter $vertex is given, return the BetwenessCentrality value of that vertex, otherwise, return all vertices BetweenessCentrality value, stored in a hash, which hash node name as keys.
ClusteringCoefficient($vertex)
Return the clustering coefficient of a given vertex.
WeightedClusteringCoefficient($vertex)
Return the weighted clustering coefficient of a given vertex. The graph object passed in should have weight attribute set on edges. Weights are default to 1 if its not set.
DistanceCentrality($vertex)
Return the distance centrality of a given vertex.
ClosenessCentrality($vertex)
An alias of DistanceCentrality().
GraphCentrality($vertex)
Return the graph centrality of a given vertex.
edges(@vertices)
Return a list of edges that connets any two of @vertices.
<<lessSYNOPSIS
use Graph::Undirected;
use Algorithm::SocialNetwork;
my $G = Graph::Undirected->new();
$G->add_edges([qw(a b)], [qw(b c)]);
my $algo = Algorithm::SocialNetwork->new(graph => $G3);
my $BC = $algo->BetweenessCentrality();
# $BC->{a} is 0
# $BC->{b} is 2
# $BC->{c} is 0
METHODS
So far this module implement the algorithm provided in [1]. More handy algorithm would be included in the future.
This module is a Spiffy module, methods provided as "field" are marked.
new([graph => $G])
Object constructor, an optional graph parameter could be passed in to specify the network graph to be analyzed.
graph([$G]) [Spiffy field]
Without arguments, this method return the current Graph object.
BetweenessCentrality([$vertex])
The implementation of algorithm provided in [1], if an optional parameter $vertex is given, return the BetwenessCentrality value of that vertex, otherwise, return all vertices BetweenessCentrality value, stored in a hash, which hash node name as keys.
ClusteringCoefficient($vertex)
Return the clustering coefficient of a given vertex.
WeightedClusteringCoefficient($vertex)
Return the weighted clustering coefficient of a given vertex. The graph object passed in should have weight attribute set on edges. Weights are default to 1 if its not set.
DistanceCentrality($vertex)
Return the distance centrality of a given vertex.
ClosenessCentrality($vertex)
An alias of DistanceCentrality().
GraphCentrality($vertex)
Return the graph centrality of a given vertex.
edges(@vertices)
Return a list of edges that connets any two of @vertices.
Download (0.009MB)
Added: 2007-08-16 License: Perl Artistic License Price:
801 downloads
Net::Delicious::Iterator 1.01
Net::Delicious::Iterator is an iterator class for Net::Delicious thingies. more>>
Net::Delicious::Iterator is an iterator class for Net::Delicious thingies.
SYNOPSIS
use Net::Delicious::Iterator;
my @dates = ({...},{...});
my $it = Net::Delicious::Iterator->new("Date",@dates);
while (my $d = $it->next()) {
# Do stuff with $d here
}
NOTES
It isnt really expected that you will instantiate these objects outside of Net::Delicious itself.
PACKAGE METHODS
__PACKAGE__->new($foreign_class,@data)
Returns a Net::Delicious::Iterator object. Woot!
$it->count()
Return the number of available thingies.
$it->next()
Returns the next object in the list of available thingies. Woot!
<<lessSYNOPSIS
use Net::Delicious::Iterator;
my @dates = ({...},{...});
my $it = Net::Delicious::Iterator->new("Date",@dates);
while (my $d = $it->next()) {
# Do stuff with $d here
}
NOTES
It isnt really expected that you will instantiate these objects outside of Net::Delicious itself.
PACKAGE METHODS
__PACKAGE__->new($foreign_class,@data)
Returns a Net::Delicious::Iterator object. Woot!
$it->count()
Return the number of available thingies.
$it->next()
Returns the next object in the list of available thingies. Woot!
Download (0.018MB)
Added: 2006-07-27 License: Perl Artistic License Price:
1184 downloads
ModPerl::PackageRegistry 0.02
ModPerl::PackageRegistry is a Perl module to map URIs to perl package namespaces. more>>
ModPerl::PackageRegistry is a Perl module to map URIs to perl package namespaces.
SYNOPSIS
Apache:
< Location /dynamic >
SetHandler perl-script
PerlResponseHandler ModPerl::PackageRegistry
PackageNamespace MyWebsite::pages
PackageBase /dynamic
PackageIndex index
PackageHandler ->page
< /Location >
Perl:
package MyWebsite::pages::index;
use strict;
use warnings;
use Apache2::RequestRec ();
use Apache2::Const q(OK);
return 1;
sub page {
my($class, $r) = @_;
$r->do_stuff();
return OK;
}
This mod_perl2 handler allows you to directly map a path in your apache 2.x server to a package namespace in perl. When the handler is invoked, it transforms the URI requested into the name of a perl module, and if that module is found, executes the handler specified by the PackageHandler directive.
<<lessSYNOPSIS
Apache:
< Location /dynamic >
SetHandler perl-script
PerlResponseHandler ModPerl::PackageRegistry
PackageNamespace MyWebsite::pages
PackageBase /dynamic
PackageIndex index
PackageHandler ->page
< /Location >
Perl:
package MyWebsite::pages::index;
use strict;
use warnings;
use Apache2::RequestRec ();
use Apache2::Const q(OK);
return 1;
sub page {
my($class, $r) = @_;
$r->do_stuff();
return OK;
}
This mod_perl2 handler allows you to directly map a path in your apache 2.x server to a package namespace in perl. When the handler is invoked, it transforms the URI requested into the name of a perl module, and if that module is found, executes the handler specified by the PackageHandler directive.
Download (0.007MB)
Added: 2007-03-22 License: Perl Artistic License Price:
947 downloads
Parrot::OpTrans 0.4.5
Parrot::OpTrans is a Perl module that can transform Ops to C Code. more>>
Parrot::OpTrans is a Perl module that can transform Ops to C Code.
Parrot::OpTrans is the abstract superclass for the Parrot op to C transforms. Each transform contains various bits of information needed to generate the C code, and creates a different type of run loop. The methods defined here supply various default values and behaviour common to all transforms.
The subclass hierarchy is as follows:
OpTrans
|_________________________
| | |
C CGoto Compiled
| |
CPrederef |
| | |
| |_________|
| |
CSwitch CGP
Class Methods
new()
Returns a new instance.
Instance Methods
prefix()
Returns the default Parrot_ prefix.
Used by Parrot::Ops func_name() to individuate op function names.
suffix()
Implemented in subclasses to return a suffix with which to individuate variable names. This default implementation returns an empty string.
defines()
Implemented in subclasses to return the C #define macros required.
opsarraytype()
Returns the type for the array of opcodes. By default here its an array opcode_t, but the prederef runops core uses an array of void* to do its clever tricks.
core_type()
Implemented in subclasses to return the type of core created by the transform. This default implementation raises an exception indicating that the core type is missing. See the Parrot_Run_core_t enum in include/parrot/interpreter.h for a list of the core types.
core_prefix()
Implemented in subclasses to return a short prefix indicating the core type used to individuate core function names.
run_core_func_decl($base)
Optionally implemented in subclasses to return the C code for the run core function declaration. $base is the name of the main ops file minus the .ops extension.
ops_addr_decl($base_suffix)
Optionally implemented in subclasses to return the C code for the ops address declaration. $base_suffix is the name of the main ops file minus the .ops extension with suffix() and an underscore appended.
run_core_func_decl($base)
Optionally implemented in subclasses to return the C code for the run core function declaration. $base is the same as for run_core_func_decl().
run_core_func_start()
Implemented in subclasses, if run_core_func_decl() is implemented, to return the C code prior to the run core function.
run_core_after_addr_table($base_suffix)
Optionally implemented in subclasses to return the run core C code for section after the address table. $base_suffix is the same as for ops_addr_decl().
run_core_finish($base)
Implemented in subclasses to return the C code following the run core function. $base is the same as for run_core_func_decl().
init_func_init1($base)
Optionally implemented in subclasses to return the C code for the cores init function. $base is the same as for run_core_func_decl().
init_set_dispatch($base_suffix)
Optionally implemented in subclasses to return the C code for initializing the dispatch mechanism within the cores init function. $base_suffix is the same as for ops_addr_decl().
Macro Substitutions
The following methods are called by Parrot::OpFile to perform ops file macro substitutions.
access_arg($type, $value, $op)
Implemented in subclasses to return the C code for the specified op argument type and value. $op is an instance of Parrot::Op.
gen_goto($where)
The various goto_X methods below call this method with the return value of an expr_X method (implemented in subclass).
restart_address($address)
Implemented in subclasses to return the C code for restart ADDRESS($address).
restart_offset($offset)
Implemented in subclasses to return the C code for restart OFFSET($offset).
goto_address($address)
Transforms the goto ADDRESS($address) macro in an ops file into the relevant C code.
goto_offset($offset)
Transforms the goto OFFSET($offset) macro in an ops file into the relevant C code.
goto_pop()
Transforms the goto POP($address) macro in an ops file into the relevant C code.
expr_offset($offset)
Implemented in subclasses to return the C code for OFFSET($offset). Called by goto_offset().
expr_address($address)
Implemented in subclasses to return the C code for ADDRESS($address). Called by goto_address().
<<lessParrot::OpTrans is the abstract superclass for the Parrot op to C transforms. Each transform contains various bits of information needed to generate the C code, and creates a different type of run loop. The methods defined here supply various default values and behaviour common to all transforms.
The subclass hierarchy is as follows:
OpTrans
|_________________________
| | |
C CGoto Compiled
| |
CPrederef |
| | |
| |_________|
| |
CSwitch CGP
Class Methods
new()
Returns a new instance.
Instance Methods
prefix()
Returns the default Parrot_ prefix.
Used by Parrot::Ops func_name() to individuate op function names.
suffix()
Implemented in subclasses to return a suffix with which to individuate variable names. This default implementation returns an empty string.
defines()
Implemented in subclasses to return the C #define macros required.
opsarraytype()
Returns the type for the array of opcodes. By default here its an array opcode_t, but the prederef runops core uses an array of void* to do its clever tricks.
core_type()
Implemented in subclasses to return the type of core created by the transform. This default implementation raises an exception indicating that the core type is missing. See the Parrot_Run_core_t enum in include/parrot/interpreter.h for a list of the core types.
core_prefix()
Implemented in subclasses to return a short prefix indicating the core type used to individuate core function names.
run_core_func_decl($base)
Optionally implemented in subclasses to return the C code for the run core function declaration. $base is the name of the main ops file minus the .ops extension.
ops_addr_decl($base_suffix)
Optionally implemented in subclasses to return the C code for the ops address declaration. $base_suffix is the name of the main ops file minus the .ops extension with suffix() and an underscore appended.
run_core_func_decl($base)
Optionally implemented in subclasses to return the C code for the run core function declaration. $base is the same as for run_core_func_decl().
run_core_func_start()
Implemented in subclasses, if run_core_func_decl() is implemented, to return the C code prior to the run core function.
run_core_after_addr_table($base_suffix)
Optionally implemented in subclasses to return the run core C code for section after the address table. $base_suffix is the same as for ops_addr_decl().
run_core_finish($base)
Implemented in subclasses to return the C code following the run core function. $base is the same as for run_core_func_decl().
init_func_init1($base)
Optionally implemented in subclasses to return the C code for the cores init function. $base is the same as for run_core_func_decl().
init_set_dispatch($base_suffix)
Optionally implemented in subclasses to return the C code for initializing the dispatch mechanism within the cores init function. $base_suffix is the same as for ops_addr_decl().
Macro Substitutions
The following methods are called by Parrot::OpFile to perform ops file macro substitutions.
access_arg($type, $value, $op)
Implemented in subclasses to return the C code for the specified op argument type and value. $op is an instance of Parrot::Op.
gen_goto($where)
The various goto_X methods below call this method with the return value of an expr_X method (implemented in subclass).
restart_address($address)
Implemented in subclasses to return the C code for restart ADDRESS($address).
restart_offset($offset)
Implemented in subclasses to return the C code for restart OFFSET($offset).
goto_address($address)
Transforms the goto ADDRESS($address) macro in an ops file into the relevant C code.
goto_offset($offset)
Transforms the goto OFFSET($offset) macro in an ops file into the relevant C code.
goto_pop()
Transforms the goto POP($address) macro in an ops file into the relevant C code.
expr_offset($offset)
Implemented in subclasses to return the C code for OFFSET($offset). Called by goto_offset().
expr_address($address)
Implemented in subclasses to return the C code for ADDRESS($address). Called by goto_address().
Download (3.1MB)
Added: 2006-07-06 License: Perl Artistic License Price:
1205 downloads
Net::DNS::TestNS 1.09
Net::DNS::TestNS is a Perl extension for simulating simple Nameservers. more>>
Net::DNS::TestNS is a Perl extension for simulating simple Nameservers.
SYNOPSIS
use Net::DNS::TestNS;
ABSTRACT
Class for setting up "simple DNS" servers.
Class to setup a number of nameservers that respond to specific DNS queries (QNAME,QTYPE) by prespecified answers. This class is to be used in test suites where you want to have servers to show predefined behavior.
If the server will do a lookup based on QNAME,QTYPE and return the specified data. If there is no QNAME, QTYPE match the server will return a SERVFAIL.
A log will be written to STDERR it contains time, IP/PORT, QNAME, QTYPE, RCODE
<<lessSYNOPSIS
use Net::DNS::TestNS;
ABSTRACT
Class for setting up "simple DNS" servers.
Class to setup a number of nameservers that respond to specific DNS queries (QNAME,QTYPE) by prespecified answers. This class is to be used in test suites where you want to have servers to show predefined behavior.
If the server will do a lookup based on QNAME,QTYPE and return the specified data. If there is no QNAME, QTYPE match the server will return a SERVFAIL.
A log will be written to STDERR it contains time, IP/PORT, QNAME, QTYPE, RCODE
Download (0.016MB)
Added: 2006-09-21 License: Perl Artistic License Price:
1129 downloads
Interval arithmetic for Ada 1.5
Interval arithmetic for Ada is a math library that provides an implementation of intervals for Ada. more>>
Interval arithmetic for Ada is a math library that provides an implementation of intervals for Ada. It includes arithmetic and relational operations.
Examples:
Tri-state logic
The package Intervals serves as a root package and also provides tri-state logic necessary to define relational operations on intervals. The type Logical is defined as:
type Logical is (False, True, Uncertain);
The following operations are defined for Logical:
function "not" (Left : Logical) return Logical;
function "and" (Left, Right : Logical) return Logical;
function "and" (Left : Logical; Right : Boolean)
return Logical;
function "and" (Left : Boolean; Right : Logical)
return Logical;
function "or" (Left, Right : Logical) return Logical;
function "or" (Left : Logical; Right : Boolean)
return Logical;
function "or" (Left : Boolean; Right : Logical)
return Logical;
function "xor" (Left, Right : Logical) return Logical;
function "xor" (Left : Logical; Right : Boolean)
return Logical;
function "xor" (Left : Boolean; Right : Logical)
return Logical;
Enhancements:
- For GNAT users GPS project files were included;
- Based on Measurement units for Ada v 2.4.
<<lessExamples:
Tri-state logic
The package Intervals serves as a root package and also provides tri-state logic necessary to define relational operations on intervals. The type Logical is defined as:
type Logical is (False, True, Uncertain);
The following operations are defined for Logical:
function "not" (Left : Logical) return Logical;
function "and" (Left, Right : Logical) return Logical;
function "and" (Left : Logical; Right : Boolean)
return Logical;
function "and" (Left : Boolean; Right : Logical)
return Logical;
function "or" (Left, Right : Logical) return Logical;
function "or" (Left : Logical; Right : Boolean)
return Logical;
function "or" (Left : Boolean; Right : Logical)
return Logical;
function "xor" (Left, Right : Logical) return Logical;
function "xor" (Left : Logical; Right : Boolean)
return Logical;
function "xor" (Left : Boolean; Right : Logical)
return Logical;
Enhancements:
- For GNAT users GPS project files were included;
- Based on Measurement units for Ada v 2.4.
Download (0.25MB)
Added: 2007-08-23 License: GMGPL (GNAT Modified GPL) Price:
792 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 return 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