Sub::Slice::Manual 1.048 |
Date Added: May 18, 2010 | Visits: 382 |
|
||||||||
|
Sub::Slice::Manual is a Perl module with user guide for Sub::Slice. USING Sub::Slice Sub::Slice is a way of breaking down a long-running process and maintaining state across a stateless protocol. This allows the client to draw a progress bar or abort the process part-way through. The mechanism used by Sub::Slice is similar to the session management used on many web user authentication systems. However rather than simply passing an ID back as a token as these systems do, in Sub::Slice a data structure with richer information is passed to the client, allowing the client to make some intelligent decisions rather than blindly maintain state. Use of Sub::Slice is best explained with a minimal example. Assume that there is a remoting protocol between the client and server such as XML/HTTP. For the sake of brevity, assume that methods called in package Server:: on the client are magically remoted to the server. The server does two things. The first is to issue a token for the client to use: #Server sub create_token { my $job = new Sub::Slice(); return $job->token; } The second is to provide the routine into which the token is passed for each iteration: sub do_work { my $token = shift; my $job = new Sub::Slice(token => $token); at_start $job sub { my $files = files_to_process(); #Store some data defining the work to do $job->store("files", $files); }; at_stage $job "each_iteration" sub { #Get some work my $files = $job->fetch("files"); my $file = shift @$files; my $was_ok = process_file($file); #Record we did the work $job->store("files", $files); #Check if theres any more work left to do $job->done() unless(@$files); }; } The client somehow gets a token back from the server. It then passes this back to the server for each iteration. It can inspect the token to check if there is any more work left. #Client my $token = Server::create_token(); for(1 .. MAX_ITERATIONS) { Server::do_work($token); last if $token->{done}; }.
|
| License: Freeware | Size: 27.65 KB |
|
Libraries
-
Mon::Client 0.11
Mon::Client is a Perl module with methods for interaction with Mon client. SYNOPSIS use Mon::Client; Mon::Client is used to interact with "mon" clients. It supports a protocol-independent API for retrieving the status of the mon server, and... |
23.55 KB | |
|
Libraries
-
Bundle::MusicBrainz::Client 0.01
Bundle::MusicBrainz::Client is a Perl module with a bundle to install MusicBrainz::Client and required modules. SYNOPSIS perl -MCPAN -e install Bundle::MusicBrainz::Client CONTENTS MusicBrainz::Client - for to get to know thyself... |
2.05 KB | |
|
Libraries
-
IO::Prompt 0.99.4
IO::Prompt is a Perl module to interactively prompt for user input. SYNOPSIS use IO::Prompt; while( prompt "next: " ) { print "You said $_n"; } By default, this module exports a single function prompt. It prompts the user to enter some... |
14.34 KB | |
|
Libraries
-
Net::GPSD 0.35
Net::GPSD is a Perl module that provides an object client interface to the gpsd server daemon. SYNOPSIS use Net::GPSD; $obj=Net::GPSD->new; my $point=$obj->get; print $point->latlon. "n"; or use Net::GPSD; $obj=Net::GPSD->new;... |
15.36 KB | |
|
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
-
Video::Info::ASF 0.993
Video::Info::ASF is a Perl module for ASF files for attributes like: -video codec -audio codec -frame height -frame width -frame count and more! SYNOPSIS use Video::Info::ASF; my $video; $video =... |
634.88 KB | |
|
Libraries
-
Similars 1.2
Similars is a Perl module that can locate similar files. SYNOPSIS [perl -S] similars.pl [--level=1] [dirs...] Similar-sized and similar-named files are picked as suspicious candidates of duplicated files. What descirbes it better than a... |
10.24 KB | |
|
Libraries
-
Devel::Tinderbox::Reporter 0.10
Devel::Tinderbox::Reporter is a Perl module with client to send reports to Tinderbox. SYNOPSIS use Devel::Tinderbox::Reporter; my $report = Devel::Tinderbox::Reporter->new; $report->from(your@mail.address.com);... |
3.07 KB | |
|
Libraries
-
HTTPD::GroupAdmin 1.66
HTTPD::GroupAdmin is a Perl module for the management of HTTP server group databases. SYNOPSIS use HTTPD::GroupAdmin (); This software is meant to provide a generic interface that hides the inconsistencies across HTTP server implementations... |
112.64 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 |
|
Programming
-
RailsTidy 0.1
RailsTidy project is a plugin for Ruby On Rails.. |
11.26 KB | |
|
Programming
-
Strings edit 1.9
Strings edit is a library that provides I/O facilities for integer, floating-point, Roman numbers, and strings. Both input and output subroutines support string pointers for consequent stream processing. The output can be aligned in a fixed size... |
54.27 KB | |
|
Programming
-
BScript 0.3
BScript is a (yet another) BASIC interpreter. It is free software and open-sourced, licensed under the terms of the GNU General Public License version 2 or later. You can use BScript to teach BASIC to your students, write understandable shell... |
112.64 KB | |
|
Programming
-
Kits JavaScript Brainf*ck Interpreter 0.01
Kits JavaScript Brainf*ck Interpreter is a rather fast interpreter for the Brainf*ck esoteric programming language.. Kit's JavaScript Brainfuck Interpreter v0.01 |
5.12 KB | |
|
Programming
-
dis6502 0.12
dis6502 is a flow-tracing disassembler for the 6502, originally written by Robert Bond and supporting Atari binary files. Robert posted dis6502 to the Usenet newsgroup net.sources on 9-Oct-1986, and to comp.sources.unix 7-Jun-1988. Udi... |
19.46 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 | |
|
Libraries
-
App::SimpleScan::Substitution::Line 2.02
App::SimpleScan::Substitution::Line is a line with optional fixed variable values. SYNOPSIS my $line = App::SimpleScan::Substitution::Line->new(" this "); # Use only this value when substituting " ". $line->fix(substituite =>... |
54.27 KB | |
|
Libraries
-
PDL::Graphics::TriD 2.4.3
PDL::Graphics::TriD is a PDL 3D interface. SYNOPSIS use PDL::Graphics::TriD; # After each graph, let the user rotate is and # wait for him to press q, then make new graph line3d($coords); # $coords = (3,n,...) line3d($coords,$colors); #... |
2.1 MB | |
|
Libraries
-
SmartColorWell 1.2
SmartColorWell is a cross-platform open-source ColorWell class for REALbasic 4 or greater. The SmartColorWell control stores a color value and displays that color in a simulated BevelButton that when pressed allows the user to change the color... |
21.5 KB |
