dispatch
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 91
dispatch 0.0.2a
dispatch is a multi-tier architecture object-oriented framework. more>>
dispatch is a multi-tier architecture object-oriented framework that allows access to methods and variables at the command line and in shell scripts or via a GUI.
The project is in an early stage and you will probably not be able to compile it easily or use it for significant work.
There are lots of things which are not documented yet, as they only work occasionally. As the current written code is only a framework, no real application of it yet exists, there are still much things to invent. Get involved.
This software package represents a meta program used to manage unix programs. It is a class library in the domain of system administration. It is similar to Microsoft .NET or corba or Unix as it is language independent. Indeed, a method can be written in any language, because the interface of a method is the same as that of a unix command.
That means a method is passed an array of arguments, it has a standard input, standard output and standard error channel and returns a small integer exit code. The difference to a shell script is that there is no actual execve system call involved in calling a method, but the method is in a shared object that can be linked dynamically into the running process.
With interpreted languages like perl, first the interpreter is dynamically linked into the current process which in turn executes the method written in the target language. That means that the second call of a certain method only involves some lookup in internal data structures to find the already loaded (c++, perl) and byte-compiled (perl) implementation.
But this is only half of the story. The power of object orientation to a certain degree comes from the fact that you have abstract interfaces and concrete implementations which are interchangeable to a certain extend. This fact is still true of course, when you map the OO paradigm to the Unix shell and the domain of system management.
But unfortunately this principle was not honored by the software that exists on posix compatible systems so far. An example of an interface relating to system management and configuration is internet server software configuration.
There a many ways to configure on which port a piece of software should listen. In apache, you write Listen or BindAddress, the tcpserver from ucspi-tcp expects a command line argument, the inetd superserver expects it as the first column of a table in a free-form textfile.
It is therefore impossible to know where an arbitrary server listens if you do not write specialized parser code for every configuration file format in existence. It would be so much easier to have an interface that has a method called port that you can call to either query the port or set it. Then you can call the exact same method on any server that implements the interface and dont have to care about syntax rules.
Enhancements:
- Examples added
<<lessThe project is in an early stage and you will probably not be able to compile it easily or use it for significant work.
There are lots of things which are not documented yet, as they only work occasionally. As the current written code is only a framework, no real application of it yet exists, there are still much things to invent. Get involved.
This software package represents a meta program used to manage unix programs. It is a class library in the domain of system administration. It is similar to Microsoft .NET or corba or Unix as it is language independent. Indeed, a method can be written in any language, because the interface of a method is the same as that of a unix command.
That means a method is passed an array of arguments, it has a standard input, standard output and standard error channel and returns a small integer exit code. The difference to a shell script is that there is no actual execve system call involved in calling a method, but the method is in a shared object that can be linked dynamically into the running process.
With interpreted languages like perl, first the interpreter is dynamically linked into the current process which in turn executes the method written in the target language. That means that the second call of a certain method only involves some lookup in internal data structures to find the already loaded (c++, perl) and byte-compiled (perl) implementation.
But this is only half of the story. The power of object orientation to a certain degree comes from the fact that you have abstract interfaces and concrete implementations which are interchangeable to a certain extend. This fact is still true of course, when you map the OO paradigm to the Unix shell and the domain of system management.
But unfortunately this principle was not honored by the software that exists on posix compatible systems so far. An example of an interface relating to system management and configuration is internet server software configuration.
There a many ways to configure on which port a piece of software should listen. In apache, you write Listen or BindAddress, the tcpserver from ucspi-tcp expects a command line argument, the inetd superserver expects it as the first column of a table in a free-form textfile.
It is therefore impossible to know where an arbitrary server listens if you do not write specialized parser code for every configuration file format in existence. It would be so much easier to have an interface that has a method called port that you can call to either query the port or set it. Then you can call the exact same method on any server that implements the interface and dont have to care about syntax rules.
Enhancements:
- Examples added
Download (0.012MB)
Added: 2005-12-15 License: GPL (GNU General Public License) Price:
1442 downloads
Log::Dispatch::ToTk 1.7
Log::Dispatch::ToTk provides class to redirect Log::Dispatch to Tk widgets. more>>
Log::Dispatch::ToTk provides class to redirect Log::Dispatch to Tk widgets.
Most users will only need to use Log::Dispatch::TkText widget to have Log::Dispatch messages written on a text widget.
For more fancy uses, this module can be used by a composite widget dedicated to handle Log::Dispatch logs.
This module is the interface class between Log::Dispatch and Tk widgets. This class is derived from Log::Dispatch::Output.
One ToTk object will be created for each Log::Dispatch::Tk* widget and the user must register the ToTk object to the log dispatcher.
Create a new ToTk object. Parameter are :
- widget ($) - The buddy widget object
- name ($) - The name of the object (not the filename!). Required.
- min_level ($) - The minimum logging level this object will accept. See the Log::Dispatch documentation for more information. Required.
- max_level ($) - The maximum logging level this obejct will accept. See the Log::Dispatch documentation for more information. This is not required. By default the maximum is the highest possible level (which means functionally that the object has no maximum).
<<lessMost users will only need to use Log::Dispatch::TkText widget to have Log::Dispatch messages written on a text widget.
For more fancy uses, this module can be used by a composite widget dedicated to handle Log::Dispatch logs.
This module is the interface class between Log::Dispatch and Tk widgets. This class is derived from Log::Dispatch::Output.
One ToTk object will be created for each Log::Dispatch::Tk* widget and the user must register the ToTk object to the log dispatcher.
Create a new ToTk object. Parameter are :
- widget ($) - The buddy widget object
- name ($) - The name of the object (not the filename!). Required.
- min_level ($) - The minimum logging level this object will accept. See the Log::Dispatch documentation for more information. Required.
- max_level ($) - The maximum logging level this obejct will accept. See the Log::Dispatch documentation for more information. This is not required. By default the maximum is the highest possible level (which means functionally that the object has no maximum).
Download (0.004MB)
Added: 2007-03-29 License: Perl Artistic License Price:
939 downloads
Dispatch Software 1.12b
Dispatch Software is a Web-based dispatch system. more>>
Dispatch Software is a software that saves time, money and increase your customer satisfaction. 100% free online, web-based dispatch software makes it easy to keep track of your vehicles.
Easily view what each vehicle will be doing each day. Export the daily schedule to a printable spreadsheet file for your driver to take on the road. View all units on one page for faster scheduling.
Dispatch drivers can view schedules ahead of time for better planning and time management.
Installation:
-copy all files to your web host
-use phpmyadmin or your mysql interface to run site.sql against your database.
-open site.xml and edit the database section with your database details.
-go to index.php and login with username of admin with a password of test.
-be sure to change the passwords for the admin and regular user.
Setup the site.xml file with your database settings as follows.
< database type="mysql" >
< server >database server address< /server >
< login >database login< /login >
< password >database password< /password >
< default >mysql database name< /default >
< /database >
Add this to your .htaccess file to prevent viewing of the xml config file.
< Files ~ ".xml" >
Order allow,deny
Deny from all
Satisfy All
< /Files >
Enhancements:
- A bug in the main library file for the dispatching system was fixed.
<<lessEasily view what each vehicle will be doing each day. Export the daily schedule to a printable spreadsheet file for your driver to take on the road. View all units on one page for faster scheduling.
Dispatch drivers can view schedules ahead of time for better planning and time management.
Installation:
-copy all files to your web host
-use phpmyadmin or your mysql interface to run site.sql against your database.
-open site.xml and edit the database section with your database details.
-go to index.php and login with username of admin with a password of test.
-be sure to change the passwords for the admin and regular user.
Setup the site.xml file with your database settings as follows.
< database type="mysql" >
< server >database server address< /server >
< login >database login< /login >
< password >database password< /password >
< default >mysql database name< /default >
< /database >
Add this to your .htaccess file to prevent viewing of the xml config file.
< Files ~ ".xml" >
Order allow,deny
Deny from all
Satisfy All
< /Files >
Enhancements:
- A bug in the main library file for the dispatching system was fixed.
Download (0.095MB)
Added: 2006-08-21 License: Free for non-commercial use Price:
1166 downloads
Log::Dispatch::Atom 0.03
Log::Dispatch::Atom is a Perl module to log to an atom feed. more>>
Log::Dispatch::Atom is a Perl module to log to an atom feed.
SYNOPSIS
use Log::Dispatch::Atom;
my $log = Log::Dispatch::Atom->new(
name => foo,
min_level => debug,
file => file.atom
);
$log->log_message( level => error, message => A problem happened );
$log->log_message( level => debug, message => Got Here );
This class implements logging backed by an Atom feed so that you can subscribe to the errors produced by your application.
You should not use this object directly, but should manage it via a Log::Dispatch object.
IMPLEMENTATION NOTES
In order to safely write to the log file, the entire file must be locked each time that an entry is logged. This probably makes it unsuitable for high volume log files.
The log file is opened and closed on each call to log_message().
METHODS
new()
Takes a hash of arguments. Returns a new Log::Dispatch::Atom object. The following parameters are used:
name [mandatory]
The name of the logging object.
min_level [mandatory]
The minimum logging level this object will accept. See Log::Dispatch for more information.
max_level [optional]
The maximum logging level this object will accept. See Log::Dispatch for more information. The default is the highest possible level (ie: no maximum).
file [mandatory]
Specifies the location of the file to read/write the feed from.
feed_id [optional]
Specifies the identity of the feed itself. Normally, this should be set to the published URI of the feed.
If not specified, it will be omitted, which is in violation of the Atom specification. For more information, see http://www.atomenabled.org/developers/syndication/#requiredFeedElements.
feed_title [optional]
The title of the feed. This should probably be set to the name of your application.
If not specified, it will be omitted, which is in violation of the Atom specification. For more information, see http://www.atomenabled.org/developers/syndication/#requiredFeedElements.
XXX This should probably just use the name parameter. What do you think? Let me know.
feed_author [optional]
The author details of a feed. This is specified as a hash reference, which must contain one or more of the three keys name, email and uri.
In order to create a valid Atom feed, you must either supply an author in every single entry (log message), or ensure that the feed itself has an author. The latter is probably the easier solution, so I recommend this parameter be supplied.
NB: The feed_* parameters will only be used when a new feed is being created. If you are creating a new object for an existing feed, they will be ignored.
log_message()
Takes a hash of arguments. Has no return value. The following parameters are used.
message [mandatory]
The actual log message.
level [mandatory]
The level of the message. See Log::Dispatch for a full list.
id [optional]
Each entry requires an id in order for the feed as a whole to be a valid Atom document. Its used by readers of Atom documents to determine whether or not an entry has been seen previously.
If not specified, this will default to an URL comprising the current time plus the pid plus the hostname plus a monotonically increasing integer. eg: tag:fred.example.com,2005-12-07:1133946771/20827/2. This should be good enough for a uniqueness test.
author [optional]
You can specify author details for an individual entry if desired. The author parameter is expected to be a hash reference, which must contain one or more of the keys name, email or uri.
<<lessSYNOPSIS
use Log::Dispatch::Atom;
my $log = Log::Dispatch::Atom->new(
name => foo,
min_level => debug,
file => file.atom
);
$log->log_message( level => error, message => A problem happened );
$log->log_message( level => debug, message => Got Here );
This class implements logging backed by an Atom feed so that you can subscribe to the errors produced by your application.
You should not use this object directly, but should manage it via a Log::Dispatch object.
IMPLEMENTATION NOTES
In order to safely write to the log file, the entire file must be locked each time that an entry is logged. This probably makes it unsuitable for high volume log files.
The log file is opened and closed on each call to log_message().
METHODS
new()
Takes a hash of arguments. Returns a new Log::Dispatch::Atom object. The following parameters are used:
name [mandatory]
The name of the logging object.
min_level [mandatory]
The minimum logging level this object will accept. See Log::Dispatch for more information.
max_level [optional]
The maximum logging level this object will accept. See Log::Dispatch for more information. The default is the highest possible level (ie: no maximum).
file [mandatory]
Specifies the location of the file to read/write the feed from.
feed_id [optional]
Specifies the identity of the feed itself. Normally, this should be set to the published URI of the feed.
If not specified, it will be omitted, which is in violation of the Atom specification. For more information, see http://www.atomenabled.org/developers/syndication/#requiredFeedElements.
feed_title [optional]
The title of the feed. This should probably be set to the name of your application.
If not specified, it will be omitted, which is in violation of the Atom specification. For more information, see http://www.atomenabled.org/developers/syndication/#requiredFeedElements.
XXX This should probably just use the name parameter. What do you think? Let me know.
feed_author [optional]
The author details of a feed. This is specified as a hash reference, which must contain one or more of the three keys name, email and uri.
In order to create a valid Atom feed, you must either supply an author in every single entry (log message), or ensure that the feed itself has an author. The latter is probably the easier solution, so I recommend this parameter be supplied.
NB: The feed_* parameters will only be used when a new feed is being created. If you are creating a new object for an existing feed, they will be ignored.
log_message()
Takes a hash of arguments. Has no return value. The following parameters are used.
message [mandatory]
The actual log message.
level [mandatory]
The level of the message. See Log::Dispatch for a full list.
id [optional]
Each entry requires an id in order for the feed as a whole to be a valid Atom document. Its used by readers of Atom documents to determine whether or not an entry has been seen previously.
If not specified, this will default to an URL comprising the current time plus the pid plus the hostname plus a monotonically increasing integer. eg: tag:fred.example.com,2005-12-07:1133946771/20827/2. This should be good enough for a uniqueness test.
author [optional]
You can specify author details for an individual entry if desired. The author parameter is expected to be a hash reference, which must contain one or more of the keys name, email or uri.
Download (0.007MB)
Added: 2007-02-09 License: Perl Artistic License Price:
987 downloads
Log::Dispatch::Config 1.01
Log::Dispatch::Config is a Log4j for Perl. more>>
Log::Dispatch::Config is a Log4j for Perl.
SYNOPSIS
use Log::Dispatch::Config;
Log::Dispatch::Config->configure(/path/to/log.conf);
my $dispatcher = Log::Dispatch::Config->instance;
$dispatcher->debug(this is debug message);
$dispatcher->emergency(something *bad* happened!);
# automatic reloading conf file, when modified
Log::Dispatch::Config->configure_and_watch(/path/to/log.conf);
# or if you write your own config parser:
use Log::Dispatch::Configurator::XMLSimple;
my $config = Log::Dispatch::Configurator::XMLSimple->new(log.xml);
Log::Dispatch::Config->configure($config);
Log::Dispatch::Config is a subclass of Log::Dispatch and provides a way to configure Log::Dispatch object with configulation file (default, in AppConfig format). I mean, this is log4j for Perl, not with all API compatibility though.
METHOD
This module has a class method configure which parses config file for later creation of the Log::Dispatch::Config singleton instance. (Actual construction of the object is done in the first instance call).
So, what you should do is call configure method once in somewhere (like startup.pl in mod_perl), then you can get configured dispatcher instance via Log::Dispatch::Config->instance.
<<lessSYNOPSIS
use Log::Dispatch::Config;
Log::Dispatch::Config->configure(/path/to/log.conf);
my $dispatcher = Log::Dispatch::Config->instance;
$dispatcher->debug(this is debug message);
$dispatcher->emergency(something *bad* happened!);
# automatic reloading conf file, when modified
Log::Dispatch::Config->configure_and_watch(/path/to/log.conf);
# or if you write your own config parser:
use Log::Dispatch::Configurator::XMLSimple;
my $config = Log::Dispatch::Configurator::XMLSimple->new(log.xml);
Log::Dispatch::Config->configure($config);
Log::Dispatch::Config is a subclass of Log::Dispatch and provides a way to configure Log::Dispatch object with configulation file (default, in AppConfig format). I mean, this is log4j for Perl, not with all API compatibility though.
METHOD
This module has a class method configure which parses config file for later creation of the Log::Dispatch::Config singleton instance. (Actual construction of the object is done in the first instance call).
So, what you should do is call configure method once in somewhere (like startup.pl in mod_perl), then you can get configured dispatcher instance via Log::Dispatch::Config->instance.
Download (0.011MB)
Added: 2007-06-12 License: Perl Artistic License Price:
864 downloads
Hash::Diff::Dispatch 0.01
Hash::Diff::Dispatch allows to execute code depending on difference between hashes. more>>
Hash::Diff::Dispatch allows to execute code depending on difference between hashes.
SYNOPSIS
my $hash_watcher = Hash::Diff::Dispatch->new(
{}, # Sets the starting hash
# The events will be called using the order returned
# by calling keys on these values...
b => &bold,
i => &italic,
);
# Will call: bold(on, 5)
$hash_watcher->update( { b => 5, a => la } );
# Will call: bold(changed, 6)
$hash_watcher->update( { b => 6 } );
# Will call: bold(changed, 0)
$hash_watcher->update( { b => 0 } );
# Will call: bold(off)
$hash_watcher->update( {} );
METHODS
new
Accepts a starting hash-ref, and then a list of keys you want to watch, and the code to execute when they change. It will take a copy of the hash in the hash-ref you specify.
update
Accepts a hash-ref, which itll take a copy of, and make it the saved hash to check the next call to update again.
If a keys value has changed, itll execute the code specified when you created the object. If the key exists where it didnt before, itll pass on as the first argument, and the new value as the second. If its changed, changed and the new value. If its been deleted, itll pass off.
<<lessSYNOPSIS
my $hash_watcher = Hash::Diff::Dispatch->new(
{}, # Sets the starting hash
# The events will be called using the order returned
# by calling keys on these values...
b => &bold,
i => &italic,
);
# Will call: bold(on, 5)
$hash_watcher->update( { b => 5, a => la } );
# Will call: bold(changed, 6)
$hash_watcher->update( { b => 6 } );
# Will call: bold(changed, 0)
$hash_watcher->update( { b => 0 } );
# Will call: bold(off)
$hash_watcher->update( {} );
METHODS
new
Accepts a starting hash-ref, and then a list of keys you want to watch, and the code to execute when they change. It will take a copy of the hash in the hash-ref you specify.
update
Accepts a hash-ref, which itll take a copy of, and make it the saved hash to check the next call to update again.
If a keys value has changed, itll execute the code specified when you created the object. If the key exists where it didnt before, itll pass on as the first argument, and the new value as the second. If its changed, changed and the new value. If its been deleted, itll pass off.
Download (0.003MB)
Added: 2007-08-15 License: Perl Artistic License Price:
800 downloads
Log::Dispatch::TkText 1.007
Log::Dispatch::TkText provides a Text widget for Log::Dispatch. more>>
Log::Dispatch::TkText provides a Text widget for Log::Dispatch.
SYNOPSIS
use Tk ;
use Log::Dispatch;
use Log::Dispatch::TkText ;
my $dispatch = Log::Dispatch->new;
my $mw = MainWindow-> new ;
my $tklog = $mw->Scrolled(LogText, name => tk,
min_level => debug);
$tklog -> pack ;
# add the logger object to $dispatch (not the widget !!)
$dispatch->add($tklog->logger) ;
$dispatch -> log
(
level => info,
message => "Quaquacomekiki ? (so says Averell Dalton)"
) ;
This widget provide a read-only text widget (based on Tk::ROText) for logging through the Log::Dispatch module.
Note that this widget works with a buddy Log::Dispatch::ToTk object which will be created by the widgets constructor. The reference to this buddy object must be added to the main log dispatcher.
<<lessSYNOPSIS
use Tk ;
use Log::Dispatch;
use Log::Dispatch::TkText ;
my $dispatch = Log::Dispatch->new;
my $mw = MainWindow-> new ;
my $tklog = $mw->Scrolled(LogText, name => tk,
min_level => debug);
$tklog -> pack ;
# add the logger object to $dispatch (not the widget !!)
$dispatch->add($tklog->logger) ;
$dispatch -> log
(
level => info,
message => "Quaquacomekiki ? (so says Averell Dalton)"
) ;
This widget provide a read-only text widget (based on Tk::ROText) for logging through the Log::Dispatch module.
Note that this widget works with a buddy Log::Dispatch::ToTk object which will be created by the widgets constructor. The reference to this buddy object must be added to the main log dispatcher.
Download (0.005MB)
Added: 2007-03-29 License: Perl Artistic License Price:
940 downloads
Content Dispatcher 1.0.2
Content Dispatcher project will dispatch content over many plone sites in one click. more>>
Content Dispatcher project will dispatch content over many plone sites in one click.
Let a content to be dispatch over many plone sites in one click.
<<lessLet a content to be dispatch over many plone sites in one click.
Download (0.093MB)
Added: 2007-02-09 License: GPL (GNU General Public License) Price:
998 downloads
Class::DispatchToAll 0.11
Class::DispatchToAll Perl module can dispatch a method call to all inherited methods. more>>
Class::DispatchToAll Perl module can dispatch a method call to all inherited methods.
SYNOPSIS
package My::Class;
our @ISA=qw(SomeClass SomeOtherClass More::Classes);
use Class::DispatchToAll qw(dispatch_to_all);
my $self=bless {},My::Class # not a proper constructor, I know..
# this calls some_method in all Classes My::Class inherits from
# and all classes those classes inherit from, and all ... you get
# the point.
$self->dispatch_to_all(some_method);
# saves all return values from all calls in an array
my @returns=$self->dispatch_to_all(some_method);
See the Docs of Damian Conways Module Class::Delegation for a good introduction about Dispatching vs. Inheritance.
Class::DispatchToAll enables you to call all instantances of a method in your inheritance tree (or labyrinth..).
The standard Perl behaviour is to call only the lefternmost instance it can fing doing a depth first traversial.
Imagine the following class structure:
C
/
A B C::C
/ /
A::A D
/
My::Class
Perl will try to find a method in this mess in this order:
My::Class -> A::A -> A -> B -> D -> B -> C::C -> C
(Note that it will look twice in B because B is a parent of both A::A and D))
As soon as Perl finds the method somewhere, it will short-circuit out of its search and invoke the method.
And that is exactly the behaviour Class::DispatchToAll changes.
If you use dispatch_to_all (provided by Class::DispatchToAll) to call your method, Perl will look in all of the aforementioned packages and run all the methods it can find. It will even collect all the return values and return them to you as an array, if you want it too.
<<lessSYNOPSIS
package My::Class;
our @ISA=qw(SomeClass SomeOtherClass More::Classes);
use Class::DispatchToAll qw(dispatch_to_all);
my $self=bless {},My::Class # not a proper constructor, I know..
# this calls some_method in all Classes My::Class inherits from
# and all classes those classes inherit from, and all ... you get
# the point.
$self->dispatch_to_all(some_method);
# saves all return values from all calls in an array
my @returns=$self->dispatch_to_all(some_method);
See the Docs of Damian Conways Module Class::Delegation for a good introduction about Dispatching vs. Inheritance.
Class::DispatchToAll enables you to call all instantances of a method in your inheritance tree (or labyrinth..).
The standard Perl behaviour is to call only the lefternmost instance it can fing doing a depth first traversial.
Imagine the following class structure:
C
/
A B C::C
/ /
A::A D
/
My::Class
Perl will try to find a method in this mess in this order:
My::Class -> A::A -> A -> B -> D -> B -> C::C -> C
(Note that it will look twice in B because B is a parent of both A::A and D))
As soon as Perl finds the method somewhere, it will short-circuit out of its search and invoke the method.
And that is exactly the behaviour Class::DispatchToAll changes.
If you use dispatch_to_all (provided by Class::DispatchToAll) to call your method, Perl will look in all of the aforementioned packages and run all the methods it can find. It will even collect all the return values and return them to you as an array, if you want it too.
Download (0.005MB)
Added: 2007-07-21 License: Perl Artistic License Price:
825 downloads
Log::Dispatch::File::Alerts 1.00
Log::Dispatch::File::Alerts is a Perl object for logging to alert files. more>>
Log::Dispatch::File::Alerts is a Perl object for logging to alert files.
SYNOPSIS
use Log::Dispatch::File::Alerts;
my $file = Log::Dispatch::File::Alerts->new(
name => file1,
min_level => emerg,
filename => Somefile%d{yyyy!!!!}.log,
mode => append );
$file->log( level => emerg,
message => "Ive fallen and I cant get upn" );
ABSTRACT
This module provides an object for logging to files under the Log::Dispatch::* system.
This module subclasses Log::Dispatch::File for logging to date/time stamped files. See Log::Dispatch::File for instructions on usage. This module differs only on the following three points:
alert files
This module will use a seperate file for every log message.
multitasking-safe
This module uses flock() to lock the file while writing to it.
stamped filenames
This module supports a special tag in the filename that will expand to the current date/time/pid.
It is the same tag Log::Log4perl::Layout::PatternLayout uses, see Log::Log4perl::Layout::PatternLayout, chapter "Fine-tune the date". In short: Include a "%d{...}" in the filename where "..." is a format string according to the SimpleDateFormat in the Java World (http://java.sun.com/j2se/1.3/docs/api/java/text/SimpleDateFormat.html). See also Log::Log4perl::DateFormat for information about further restrictions.
In addition to the format provided by Log::Log4perl::DateFormat this module also supports $ for inserting the PID and ! for inserting a uniq number. Repeat the character to define how many character wide the field should be.
A note on the !: The module first tries to find a fresh filename with this set to 1. If there is already a file with that name then it is increased until either a free filename has been found or it reaches 9999. In the later case the module dies.
<<lessSYNOPSIS
use Log::Dispatch::File::Alerts;
my $file = Log::Dispatch::File::Alerts->new(
name => file1,
min_level => emerg,
filename => Somefile%d{yyyy!!!!}.log,
mode => append );
$file->log( level => emerg,
message => "Ive fallen and I cant get upn" );
ABSTRACT
This module provides an object for logging to files under the Log::Dispatch::* system.
This module subclasses Log::Dispatch::File for logging to date/time stamped files. See Log::Dispatch::File for instructions on usage. This module differs only on the following three points:
alert files
This module will use a seperate file for every log message.
multitasking-safe
This module uses flock() to lock the file while writing to it.
stamped filenames
This module supports a special tag in the filename that will expand to the current date/time/pid.
It is the same tag Log::Log4perl::Layout::PatternLayout uses, see Log::Log4perl::Layout::PatternLayout, chapter "Fine-tune the date". In short: Include a "%d{...}" in the filename where "..." is a format string according to the SimpleDateFormat in the Java World (http://java.sun.com/j2se/1.3/docs/api/java/text/SimpleDateFormat.html). See also Log::Log4perl::DateFormat for information about further restrictions.
In addition to the format provided by Log::Log4perl::DateFormat this module also supports $ for inserting the PID and ! for inserting a uniq number. Repeat the character to define how many character wide the field should be.
A note on the !: The module first tries to find a fresh filename with this set to 1. If there is already a file with that name then it is increased until either a free filename has been found or it reaches 9999. In the later case the module dies.
Download (0.005MB)
Added: 2007-06-07 License: Perl Artistic License Price:
869 downloads
Log::Dispatch::File::Rolling 1.04
Log::Dispatch::File::Rolling is a Perl object for logging to date/time/pid stamped files. more>>
Log::Dispatch::File::Rolling is a Perl object for logging to date/time/pid stamped files.
SYNOPSIS
use Log::Dispatch::File::Rolling;
my $file = Log::Dispatch::File::Rolling->new(
name => file1,
min_level => info,
filename => Somefile%d{yyyyMMdd}.log,
mode => append );
$file->log( level => emerg,
message => "Ive fallen and I cant get upn" );
ABSTRACT
This module provides an object for logging to files under the Log::Dispatch::* system.
This module subclasses Log::Dispatch::File for logging to date/time stamped files. See Log::Dispatch::File for instructions on usage. This module differs only on the following three points:
fork()-safe
This module will close and re-open the logfile after a fork.
multitasking-safe
This module uses flock() to lock the file while writing to it.
stamped filenames
This module supports a special tag in the filename that will expand to the current date/time/pid.
It is the same tag Log::Log4perl::Layout::PatternLayout uses, see Log::Log4perl::Layout::PatternLayout, chapter "Fine-tune the date". In short: Include a "%d{...}" in the filename where "..." is a format string according to the SimpleDateFormat in the Java World (http://java.sun.com/j2se/1.3/docs/api/java/text/SimpleDateFormat.html). See also Log::Log4perl::DateFormat for information about further restrictions.
In addition to the format provided by Log::Log4perl::DateFormat this module also supports $ for inserting the PID. Repeat the character to define how many character wide the field should be. This should not be needed regularly as this module also supports logfile sharing between processes, but if youve got a high load on your logfile or a system that doesnt support flock()...
<<lessSYNOPSIS
use Log::Dispatch::File::Rolling;
my $file = Log::Dispatch::File::Rolling->new(
name => file1,
min_level => info,
filename => Somefile%d{yyyyMMdd}.log,
mode => append );
$file->log( level => emerg,
message => "Ive fallen and I cant get upn" );
ABSTRACT
This module provides an object for logging to files under the Log::Dispatch::* system.
This module subclasses Log::Dispatch::File for logging to date/time stamped files. See Log::Dispatch::File for instructions on usage. This module differs only on the following three points:
fork()-safe
This module will close and re-open the logfile after a fork.
multitasking-safe
This module uses flock() to lock the file while writing to it.
stamped filenames
This module supports a special tag in the filename that will expand to the current date/time/pid.
It is the same tag Log::Log4perl::Layout::PatternLayout uses, see Log::Log4perl::Layout::PatternLayout, chapter "Fine-tune the date". In short: Include a "%d{...}" in the filename where "..." is a format string according to the SimpleDateFormat in the Java World (http://java.sun.com/j2se/1.3/docs/api/java/text/SimpleDateFormat.html). See also Log::Log4perl::DateFormat for information about further restrictions.
In addition to the format provided by Log::Log4perl::DateFormat this module also supports $ for inserting the PID. Repeat the character to define how many character wide the field should be. This should not be needed regularly as this module also supports logfile sharing between processes, but if youve got a high load on your logfile or a system that doesnt support flock()...
Download (0.005MB)
Added: 2007-06-07 License: Perl Artistic License Price:
869 downloads
XML::Filter::Dispatcher 0.52
XML::Filter::Dispatcher is a path based event dispatching with DOM support. more>>
XML::Filter::Dispatcher is a path based event dispatching with DOM support.
SYNOPSIS
use XML::Filter::Dispatcher qw( :all );
my $f = XML::Filter::Dispatcher->new(
Rules => [
foo => &handle_foo_start_tag,
@bar => &handle_bar_attr,
## Send any elts and their contents to $handler
snarf//self::node() => $handler,
## Print the text of all elements
description
=> [ string() => sub { push @out, xvalue } ],
],
Vars => {
"id" => [ string => "12a" ],
},
);
WARNING: Beta code alert.
A SAX2 filter that dispatches SAX events based on "EventPath" patterns as the SAX events arrive. The SAX events are not buffered or converted to an in-memory document representation like a DOM tree. This provides for low lag operation because the actions associated with each pattern are executed as soon as possible, usually in an elements start_element() event method.
This differs from traditional XML pattern matching tools like XPath and XSLT (which is XPath-based) which require the entire document to be built in memory (as a "DOM tree") before queries can be executed. In SAX terms, this means that they have to build a DOM tree from SAX events and delay pattern matching until the end_document() event method is called.
<<lessSYNOPSIS
use XML::Filter::Dispatcher qw( :all );
my $f = XML::Filter::Dispatcher->new(
Rules => [
foo => &handle_foo_start_tag,
@bar => &handle_bar_attr,
## Send any elts and their contents to $handler
snarf//self::node() => $handler,
## Print the text of all elements
description
=> [ string() => sub { push @out, xvalue } ],
],
Vars => {
"id" => [ string => "12a" ],
},
);
WARNING: Beta code alert.
A SAX2 filter that dispatches SAX events based on "EventPath" patterns as the SAX events arrive. The SAX events are not buffered or converted to an in-memory document representation like a DOM tree. This provides for low lag operation because the actions associated with each pattern are executed as soon as possible, usually in an elements start_element() event method.
This differs from traditional XML pattern matching tools like XPath and XSLT (which is XPath-based) which require the entire document to be built in memory (as a "DOM tree") before queries can be executed. In SAX terms, this means that they have to build a DOM tree from SAX events and delay pattern matching until the end_document() event method is called.
Download (0.086MB)
Added: 2006-09-16 License: Perl Artistic License Price:
1133 downloads
POE::Component::Audio::Mad::Dispatch 0.3
POE::Component::Audio::Mad::Dispatch is a POE::Component::Audio::Mad frontend implementing listener based message dispatch. more>>
POE::Component::Audio::Mad::Dispatch is a POE::Component::Audio::Mad frontend implementing listener based message dispatch.
SYNOPSIS
use POE;
use POE::Component::Audio::Mad::Dispatch;
## we print some stuff below, and we dont want it
## to get buffered.. so turn on autoflush.
$| = 1;
## create our frontend session, which will create a decoder and
## forward its messages to all interested listeners..
create POE::Component::Audio::Mad::Dispatch({
decoder_play_on_open => 1,
alias => mad-decoder
});
POE::Session->create(inline_states => {
_start => &ex_start,
mad_decoder_input => &ex_input
});
sub ex_start {
my ($kernel, $heap, $session) = @_[KERNEL, HEAP, SESSION];
## add ourself in as a listener, and register for the DECODER_FRAME_DATA and
## IPC_SHUTDOWN_SUCCESS events. The decoder core will then call the
## mad_decoder_input state in the current session when these
## events arrive..
## this also has the added benefit of keeping a reference to our
## session alive in the event notification list. Our session will
## remain alive as long as we are a registered listener..
$heap->{lid} = $kernel->call(mad-decoder, add_listener, $session, mad_decoder_input, [
DECODER_FRAME_DATA, INPUT_EOF_WARNING
]);
## tell our decoder to start playing a stream..
$kernel->post(mad-decoder, decoder_open, { filename => /path/to/stream.mp3, play => 1 });
}
sub ex_input {
my ($kernel, $heap, $msg) = @_[KERNEL, HEAP, ARG0];
## this is called when the decoder has generated an event
## that we have registered for. the message packet is
## contained in ARG0, and is a hashref with two
## fields ->{id} and ->{data}. id specifies the name
## of the event, and data contains a reference to
## the data included in this event..
if ($msg->{id} eq DECODER_FRAME_DATA) {
## we got a message updating us as to player
## progress, the data part of the event will
## contain two values: ->{played} and ->{progress},
## played is the number of seconds of stream
## played..
print "rplayed: $msg->{data}->{played}" if (defined($msg->{data}->{played}));
} elsif ($msg->{id} eq INPUT_EOF_WARNING) {
## we got a message telling us that the
## decoder system has come to the end of
## the current stream, use it as a queue
## to shutdown..
print "nshutting down..n";
$kernel->post(mad-decoder, decoder_shutdown);
} else {
## unknown messages should never happen, but
## we could do something interesting with them
## here.. for simplicity, we just ignore it.
return;
}
}
## start this thing..
$poe_kernel->run();
exit();
POE::Component::Audio::Mad::Dispatch implements a multiple dispatch front end component for the POE::Wheel::Audio::Mad mpeg decoder. It receieves status messages from the decoder and dispatches them to other registered "listener" sessions. All of the states listed in POE::Wheel::Audio::Mad(3) under STATES will be defined within this components session. To control the decoder, simply post the appropriate POE::Wheel::Audio::Mad STATE to this session.
If you intend to implement a decoder that will be controlled and/or monitored by other POE::Sessions, then this is the module you want to be using. If you wish to implement a decoder through an IPC bridge, you want POE::Component::Audio::Mad::Handle.
<<lessSYNOPSIS
use POE;
use POE::Component::Audio::Mad::Dispatch;
## we print some stuff below, and we dont want it
## to get buffered.. so turn on autoflush.
$| = 1;
## create our frontend session, which will create a decoder and
## forward its messages to all interested listeners..
create POE::Component::Audio::Mad::Dispatch({
decoder_play_on_open => 1,
alias => mad-decoder
});
POE::Session->create(inline_states => {
_start => &ex_start,
mad_decoder_input => &ex_input
});
sub ex_start {
my ($kernel, $heap, $session) = @_[KERNEL, HEAP, SESSION];
## add ourself in as a listener, and register for the DECODER_FRAME_DATA and
## IPC_SHUTDOWN_SUCCESS events. The decoder core will then call the
## mad_decoder_input state in the current session when these
## events arrive..
## this also has the added benefit of keeping a reference to our
## session alive in the event notification list. Our session will
## remain alive as long as we are a registered listener..
$heap->{lid} = $kernel->call(mad-decoder, add_listener, $session, mad_decoder_input, [
DECODER_FRAME_DATA, INPUT_EOF_WARNING
]);
## tell our decoder to start playing a stream..
$kernel->post(mad-decoder, decoder_open, { filename => /path/to/stream.mp3, play => 1 });
}
sub ex_input {
my ($kernel, $heap, $msg) = @_[KERNEL, HEAP, ARG0];
## this is called when the decoder has generated an event
## that we have registered for. the message packet is
## contained in ARG0, and is a hashref with two
## fields ->{id} and ->{data}. id specifies the name
## of the event, and data contains a reference to
## the data included in this event..
if ($msg->{id} eq DECODER_FRAME_DATA) {
## we got a message updating us as to player
## progress, the data part of the event will
## contain two values: ->{played} and ->{progress},
## played is the number of seconds of stream
## played..
print "rplayed: $msg->{data}->{played}" if (defined($msg->{data}->{played}));
} elsif ($msg->{id} eq INPUT_EOF_WARNING) {
## we got a message telling us that the
## decoder system has come to the end of
## the current stream, use it as a queue
## to shutdown..
print "nshutting down..n";
$kernel->post(mad-decoder, decoder_shutdown);
} else {
## unknown messages should never happen, but
## we could do something interesting with them
## here.. for simplicity, we just ignore it.
return;
}
}
## start this thing..
$poe_kernel->run();
exit();
POE::Component::Audio::Mad::Dispatch implements a multiple dispatch front end component for the POE::Wheel::Audio::Mad mpeg decoder. It receieves status messages from the decoder and dispatches them to other registered "listener" sessions. All of the states listed in POE::Wheel::Audio::Mad(3) under STATES will be defined within this components session. To control the decoder, simply post the appropriate POE::Wheel::Audio::Mad STATE to this session.
If you intend to implement a decoder that will be controlled and/or monitored by other POE::Sessions, then this is the module you want to be using. If you wish to implement a decoder through an IPC bridge, you want POE::Component::Audio::Mad::Handle.
Download (0.022MB)
Added: 2006-11-17 License: Perl Artistic License Price:
1071 downloads
Sub::PatMat 0.01
Sub::PatMat can call a version of subroutine depending on its arguments. more>>
Sub::PatMat can call a version of subroutine depending on its arguments.
SYNOPSIS
use Sub::PatMat;
# basics:
sub fact : when($_[0] $b) { 1 }
print join ", ", sort mysort (3,1,2);
# intuiting parameter names:
sub dispatch : when($ev eq "help") { my ($ev) = @_; print "helpn" }
sub dispatch : when($ev eq "blah") { my ($ev) = @_; print "blahn" }
dispatch("help");
dispatch("blah");
# no fallback, this will die:
dispatch("hest"); # dies with "Bad match"
# silly
sub do_something : when(full_moon()) { do_one_thing() }
sub do_something { do_something_else() }
The Sub::PatMat module provides the programmer with the ability to define a subroutine multiple times and to specify what version of the subroutine should be called, depending on the parameters passed to it (or any other condition).
This is somewhat similar to argument pattern matching facility provided by many programming languages.
To use argument pattern matching on a sub, the programmer has to specify the when attribute. The parameter to the attribute must be a single Perl expression.
When the sub is called, those expressions are evaluated consequitively until one of them evaluates to a true value. When this happens, the corresponding version of a sub is called.
If none of the expressions evaluates to a true value, a Bad Match exception is thrown.
It is possible to specify a fall-back version of the function by doing one of the following:
specifying when without an expression
specifying when with an empty expression
not specifying the when attribute at all
Please note that it does not make sense to specify any non-fall-back version of the sub after the fall-back version, since such will never be called.
There is an additional limitation for the last form of the fall-back version (the one without the when attribute at all), namely, it must be the last version of the sub defined.
It is possible to specify named sub parameters in the when-expression. This facility is highly experimental and is currently limited to scalar parameters only. The named sub parameters are extracted from expressions of the form
my (parameter list) = @_;
anywhere in the body of the sub.
Version restrictions:
- The ability to intuit parameter names is very limited and without doubts buggy.
- The when attribute condition is limited to a single Perl expression.
Enhancements:
- Perl
<<lessSYNOPSIS
use Sub::PatMat;
# basics:
sub fact : when($_[0] $b) { 1 }
print join ", ", sort mysort (3,1,2);
# intuiting parameter names:
sub dispatch : when($ev eq "help") { my ($ev) = @_; print "helpn" }
sub dispatch : when($ev eq "blah") { my ($ev) = @_; print "blahn" }
dispatch("help");
dispatch("blah");
# no fallback, this will die:
dispatch("hest"); # dies with "Bad match"
# silly
sub do_something : when(full_moon()) { do_one_thing() }
sub do_something { do_something_else() }
The Sub::PatMat module provides the programmer with the ability to define a subroutine multiple times and to specify what version of the subroutine should be called, depending on the parameters passed to it (or any other condition).
This is somewhat similar to argument pattern matching facility provided by many programming languages.
To use argument pattern matching on a sub, the programmer has to specify the when attribute. The parameter to the attribute must be a single Perl expression.
When the sub is called, those expressions are evaluated consequitively until one of them evaluates to a true value. When this happens, the corresponding version of a sub is called.
If none of the expressions evaluates to a true value, a Bad Match exception is thrown.
It is possible to specify a fall-back version of the function by doing one of the following:
specifying when without an expression
specifying when with an empty expression
not specifying the when attribute at all
Please note that it does not make sense to specify any non-fall-back version of the sub after the fall-back version, since such will never be called.
There is an additional limitation for the last form of the fall-back version (the one without the when attribute at all), namely, it must be the last version of the sub defined.
It is possible to specify named sub parameters in the when-expression. This facility is highly experimental and is currently limited to scalar parameters only. The named sub parameters are extracted from expressions of the form
my (parameter list) = @_;
anywhere in the body of the sub.
Version restrictions:
- The ability to intuit parameter names is very limited and without doubts buggy.
- The when attribute condition is limited to a single Perl expression.
Enhancements:
- Perl
Download (0.014MB)
Added: 2007-08-07 License: Perl Artistic License Price:
808 downloads
Intellidiscs 1.1
Intellidiscs is a Remake of Tron: Deadly Discs for the classic Intellivision console. more>>
Intellidiscs is a Remake of Tron: Deadly Discs for the classic Intellivision console. Its also one of the few, if not the first, Tron freeware games that has nothing to do with light-cycles.
Basically, you run around in an arena fighting off bad guys with your disc. There are four different varieties of bad guy, and one of them has three different varieties of disc. More difficult enemies appear as your score increases, with the most difficult showing up if you can reach 1,000,000 points.
Bad guys enter through doors on the sides of the arena. You can jam these doors open by either hitting them with your disc, or by running into them. If you jam open doors that are opposite each other, you can run in one side and come out the other. This is very important to your survival.
If you jam enough doors, eventually a recognizer will be dispatched to fix them. If you can hit the recognizer when its eye is open, it will stop fixing the doors and leave the arena. Plus, you get lots of points for this.
You can take three hits before you die, and every hit makes you slower! You will eventually recover from damage, regaining your speed as well. Touching the recognizer kills you instantly, so dont do it.
Default controls are the familiar WASD to move, and the outer keys of numpad (1, 2, 3, 4, 6, 7, 8, 9, non-Mac users turn Num Lock on!) throw your disc in any of eight directions. If you press one of the throw keys while your disc is in flight, it will return to you. Discs are harmless when returning. If you move away from your disc as it is flying back, it will never catch up to you, you must stop and catch it. All of the controls can be changed from the main menu.
<<lessBasically, you run around in an arena fighting off bad guys with your disc. There are four different varieties of bad guy, and one of them has three different varieties of disc. More difficult enemies appear as your score increases, with the most difficult showing up if you can reach 1,000,000 points.
Bad guys enter through doors on the sides of the arena. You can jam these doors open by either hitting them with your disc, or by running into them. If you jam open doors that are opposite each other, you can run in one side and come out the other. This is very important to your survival.
If you jam enough doors, eventually a recognizer will be dispatched to fix them. If you can hit the recognizer when its eye is open, it will stop fixing the doors and leave the arena. Plus, you get lots of points for this.
You can take three hits before you die, and every hit makes you slower! You will eventually recover from damage, regaining your speed as well. Touching the recognizer kills you instantly, so dont do it.
Default controls are the familiar WASD to move, and the outer keys of numpad (1, 2, 3, 4, 6, 7, 8, 9, non-Mac users turn Num Lock on!) throw your disc in any of eight directions. If you press one of the throw keys while your disc is in flight, it will return to you. Discs are harmless when returning. If you move away from your disc as it is flying back, it will never catch up to you, you must stop and catch it. All of the controls can be changed from the main menu.
Download (2.8MB)
Added: 2007-05-01 License: Freeware Price:
908 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 dispatch 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