Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.183.861 Times

FSA::Rules 0.26

  Date Added: September 15, 2010  |  Visits: 1.233

FSA::Rules

Report Broken Link
Printer Friendly Version


Product Homepage
Download (99 downloads)



FSA::Rules is a Perl module to build simple rules-based state machines in Perl. Synopsis my $fsa = FSA::Rules->new( ping => { do => sub { print "ping!n"; my $state = shift; $state->result(pong); $state->machine->{count}++; }, rules => [ game_over => sub { shift->machine->{count} >= 20 }, pong => sub { shift->result eq pong }, ], }, pong => { do => sub { print "pong!n" }, rules => [ ping => 1, ], # always goes back to ping }, game_over => { do => sub { print "Game Overn" } } ); $fsa->start; $fsa->switch until $fsa->at(game_over); This class implements a simple state machine pattern, allowing you to quickly build rules-based state machines in Perl. As a simple implementation of a powerful concept, it differs slightly from an ideal DFA model in that it does not enforce a single possible switch from one state to another. Rather, it short circuits the evaluation of the rules for such switches, so that the first rule to return a true value will trigger its switch and no other switch rules will be checked. (But see the strict attribute and parameter to new().) It differs from an NFA model in that it offers no back-tracking. But in truth, you can use it to build a state machine that adheres to either model--hence the more generic FSA moniker. FSA::Rules uses named states so that its easy to tell what state youre in and what state you want to go to. Each state may optionally define actions that are triggered upon entering the state, after entering the state, and upon exiting the state. They may also define rules for switching to other states, and these rules may specify the execution of switch-specific actions. All actions are defined in terms of anonymous subroutines that should expect an FSA::State object itself to be passed as the sole argument. FSA::Rules objects and the FSA::State objects that make them up are all implemented as empty hash references. This design allows the action subroutines to use the FSA::State object passed as the sole argument, as well as the FSA::Rules object available via its machine() method, to stash data for other states to access, without the possibility of interfering with the state or the state machine itself..

Requirements: No special requirements
Platforms: Linux
Keyword: Build Fsa Fsarules Libraries Perl Perl Module Programming Rules Simple State State Machines Sub
Users rating: 0/10

License: Freeware Size: 30.72 KB
USER REVIEWS
More Reviews or Write Review


FSA::RULES RELATED
Libraries  -  Alien Perl module 0.91
Alien Perl module package contains external libraries wrapped up for your viewing pleasure! SYNOPSIS perldoc Alien; Alien is a package that exists just to hold together an idea, the idea of Alien:: packages, so there is no code here, just...
10.24 KB  
Libraries  -  Module::Build::TestReporter 1.00
Module::Build::TestReporter is a Perl module to help users report test failures. SYNOPSIS use Module::Build::TestReporter; my $build = Module::Build::TestReporter->new( # normal Module::Build code here ); # or, in your own M::B subclass...
8.19 KB  
Libraries  -  Module::Build::JSAN 0.01
Module::Build::JSAN is a Perl module to build JavaScript modules for JSAN. SYNOPSIS use Module::Build::JSAN; my $build = Module::Build::JSAN->new( module_name => Foo-Bar, license => perl, dist_author => Joe Developer , dist_abstract =>...
5.12 KB  
Libraries  -  OpenGeoDB Perl module 0.4
OpenGeDB Perl module is a module to access the OpenGeoDB database and calculate all ZIP codes in a certain radius..
3.07 KB  
Libraries  -  Java::Build::JVM 0.05
Java::Build::JVM is a Perl module that starts one JVM for compiling. SYNOPSIS use Java::Build::JVM; my $compiler = Java::Build::JVM->getCompiler(); $compiler->destination("some/path");...
30.72 KB  
Network & Internet  -  MyCMS perl module 1.0
MyCMS perl module provides the MN::CMS Perl module used by the MyCMS. MyCMS perl module contains Perl object classes to manage the data of MyCMS (such as articles, links, and images). MN::CMS is a perl module that allows you to manage an...
16.38 KB  
Libraries  -  Java::Build::Tasks 0.05
Java::Build::Tasks is a Perl module that collects common Java build tasks in one place: jar, jarsigner, etc. SYNOPSIS use Java::Build::Tasks; set_logger($log_object); copy_file(source, dest); copy_file(list, of, sources, dest);...
30.72 KB  
Libraries  -  Test::AutoBuild::Runtime 1.2.0
Test::AutoBuild::Runtime is a Perl module with builder runtime state. SYNOPSIS use Test::AutoBuild::Runtime; my $runtime = new Test::AutoBuild::Runtime (archive_manager => $archive_manager, monitors => %monitors, repositories =>...
204.8 KB  
Libraries  -  Log::StdLog 0.0.3
Log::StdLog is a Perl module with a simple log file via a special filehandle. SYNOPSIS use Log::StdLog { level => warn, file => "$0.log" }; # Messages at the same or a higher level are logged... print {*STDLOG} error => "This error message...
7.17 KB  
Libraries  -  MetaTrans::Languages 1.04
MetaTrans::Languages Perl module contains a simple "database" of most of the known languages. Extracted from MARC codes for languages, http://www.loc.gov/marc/languages/. SYNOPSIS use MetaTrans::Languages qw(get_lang_by_code get_code_by_lang);...
32.77 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB