Sub Assemblies
Test::Unit::TestCase is a unit testing framework base class. SYNOPSIS package FooBar; use base qw(Test::Unit::TestCase); sub new { my $self = shift()->SUPER::new(@_); # your state for fixture here return $self; } sub set_up { # provide fixture } sub tear_down { # clean up after...
Platforms: *nix
License: Freeware | Size: 45.06 KB | Download (94): Test::Unit::TestCase Download |
Sendmail::Milter is a Perl interface to sendmails Mail Filter API. SYNOPSIS use Sendmail::Milter; my %my_milter_callbacks = ( connect => &my_connect_callback, helo => &my_helo_callback, envfrom => &my_envfrom_callback, envrcpt => &my_envrcpt_callback, header => &my_header_callback,...
Platforms: *nix
License: Freeware | Size: 20.48 KB | Download (103): Sendmail::Milter Download |
Class::Observable is a Perl module that allows other classes and objects to respond to events in yours. SYNOPSIS # Define an observable class package My::Object; use base qw( Class::Observable ); # Tell all classes/objects observing this object that a state-change # has occurred sub...
Platforms: *nix
License: Freeware | Size: 10.24 KB | Download (102): Class::Observable Download |
Test::Unit::Procedural Perl module contains a procedural style unit testing interface. SYNOPSIS use Test::Unit::Procedural; # your code to be tested goes here sub foo { return 23 }; sub bar { return 42 }; # define tests sub test_foo { assert(foo() == 23, "Your message here"); } sub...
Platforms: *nix
License: Freeware | Size: 75.78 KB | Download (95): Test::Unit::Procedural Download |
Class::Std is a Perl module to support for creating standard "inside-out" classes. SYNOPSIS package MyClass; use Class::Std; # Create storage for object attributes... my %name : ATTR; my %rank : ATTR; my %snum : ATTR; my %public_data : ATTR; # Handle initialization of objects of...
Platforms: *nix
License: Freeware | Size: 30.72 KB | Download (93): Class::Std Download |
Danga::Socket is an event loop and event-driven async socket base class. SYNOPSIS package My::Socket use Danga::Socket; use base (Danga::Socket); use fields (my_attribute); sub new { my My::Socket $self = shift; $self = fields::new($self) unless ref $self; $self->SUPER::new( @_ );...
Platforms: *nix
License: Freeware | Size: 18.43 KB | Download (92): Danga::Socket Download |
Params::Validate is a Perl module to validate method/function parameters. SYNOPSIS use Params::Validate qw(:all); # takes named params (hash or hashref) sub foo { validate( @_, { foo => 1, # mandatory bar => 0, # optional } ); } # takes positional params sub bar { # first two...
Platforms: *nix
License: Freeware | Size: 79.87 KB | Download (109): Params::Validate Download |
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} >=...
Platforms: *nix
License: Freeware | Size: 30.72 KB | Download (99): FSA::Rules Download |
Object::Transaction is a virtual base class for transactions on files containing serialized hash objects. SYNOPSIS use Object::Transaction; transaction($coderef, @codeargs); commit(); abandon(); $there_is_a_pending_transaction = transaction_pending() package Pkg; @ISA =...
Platforms: *nix
License: Freeware | Size: 17.41 KB | Download (90): Object::Transaction Download |
Thread::Apartment is an apartment threading wrapper for Perl objects. SYNOPSIS package MyClass; use Thread::Apartment::Server; use base qw(Thread::Apartment::Server); sub new { # # the usual constructor # } # # mark some methods as simplex # sub get_simplex_methods { return {...
Platforms: *nix
License: Freeware | Size: 73.73 KB | Download (96): Thread::Apartment Download |
Async::Group is a Perl class to deal with simultaneous asynchronous calls. SYNOPSIS use Async::Group ; use strict ; sub sub1 { print "Dummy subroutine n"; my $dummy = shift ; my $cb = shift ; &$cb(1); } sub allDone { print "All done, result is ", shift ,"n" ; } my $a =...
Platforms: *nix
License: Freeware | Size: 4.1 KB | Download (105): Async::Group Download |
Thread::Pool contains group of threads for performing similar jobs. SYNOPSIS use Thread::Pool; $pool = Thread::Pool->new( { optimize => cpu, # default: memory pre => sub {shift; print "starting worker with @_n", do => sub {shift; print "doing job for @_n"; reverse @_}, post => sub...
Platforms: *nix
License: Freeware | Size: 26.62 KB | Download (103): Thread::Pool Download |
Parlement is a threaded forum and a mailing list, and also a voting system where every one can propose, vote, or delegate their vote (a delegation being for one post/mail/poll and its sub-threads). This results in a mix of Direct and Participative Democracy, a Web board where any sort of...
Platforms: *nix
License: Freeware | Size: 460.8 KB | Download (107): Parlement Download |
File::FindByRegex is a Perl wrapper for File::Find that finds a directory tree and runs some action for each file whose name matchs a regex. SYNOPSYS use File::FindByRegex; $find = File::FindByRegex->new( { -srcdir => [C:tmpteradata-sql], -tardir => C:tmpteradata-sqldoc, -find =>...
Platforms: *nix
License: Freeware | Size: 10.24 KB | Download (92): File::FindByRegex Download |
dtRdr::Logger is a Perl module for global logging. SYNOPSIS use dtRdr::Logger; L->debug($message, ...); L->info($message, ...); L->warn($message, ...); L->error($message, ...); L->fatal($message, ...); For a stacktrace: sub bar { L()->logcluck("foo"); } See Log::Log4perl for more...
Platforms: *nix
License: Freeware | Size: 2.8 MB | Download (93): dtRdr::Logger Download |
Benchmark is a Perl module with benchmark running times of Perl code. SYNOPSIS use Benchmark qw(:all) ; timethis ($count, "code"); # Use Perl code in strings... timethese($count, { Name1 => ...code1..., Name2 => ...code2..., }); # ... or use subroutine references. timethese($count,...
Platforms: *nix
License: Freeware | Size: 12.2 MB | Download (102): Benchmark Download |
Religion is a Perl module that can generate tracebacks and create and install die() and warn() handlers. This is a second go at a module to simplify installing die() and warn() handlers, and to make such handlers easier to write and control. For most people, this just means that if use use...
Platforms: *nix
License: Freeware | Size: 5.12 KB | Download (95): Religion Download |
Class::Declare is a Perl module created to declare classes with public, private and protected attributes and methods. SYNOPSIS package My::Class; use strict; use warnings; use base qw( Class::Declare ); __PACKAGE__->declare( public => { public_attr => 42 } , private => { private_attr...
Platforms: *nix
License: Freeware | Size: 76.8 KB | Download (88): Class::Declare Download |
Class::Declare::Attributes is a Perl module with Class::Declare method types using Perl attributes. SYNOPSIS package My::Class; use 5.006; use strict; use warnings; use base qw( Class::Declare::Attributes ); # declare the class/instance attributes __PACKAGE__->declare( ... ); # #...
Platforms: *nix
License: Freeware | Size: 21.5 KB | Download (93): Class::Declare::Attributes Download |
Class::Agreement is a Perl module that add contracts to your Perl classes easily. SYNOPSIS package SomeClass; use Class::Agreement; # use base Class::Accessor or Class::MethodMaker, # or roll your own: sub new { ... } invariant { my ($self) = @_; $self->count > 0; }; precondition...
Platforms: *nix
License: Freeware | Size: 27.65 KB | Download (96): Class::Agreement Download |