Subroutine
Sort::Key is the fastest way to sort anything in Perl. SYNOPSIS use Sort::Key qw(keysort nkeysort ikeysort); @by_name = keysort { "$_->{surname} $_->{name}" } @people; # sorting by a numeric key: @by_age = nkeysort { $_->{age} } @people; # sorting by a numeric integer key: @by_sons =...
Platforms: *nix
License: Freeware | Size: 56.32 KB | Download (94): Sort::Key Download |
RPM::Make is a Perl module to cleanly generate an RPM. SYNOPSIS use RPM::Make; # The "Manifest": list of files that will comprise the software package. my @filelist=(tmproot/file1.txt, tmproot/file2.txt, tmproot/file3.txt, tmproot/file4.txt); my %doc; my %conf; my %confnoreplace; my...
Platforms: *nix
License: Freeware | Size: 16.38 KB | Download (94): RPM::Make Download |
File::SmartNL is a slurp text files no matter the New Line (NL) sequence. SYNOPSIS ##### # Subroutine Interface # use File::SmartNL qw(config fin fout smartnl); $old_value = config( $option ); $old_value = config( $option => $new_value); (@all_options) = config( ); $data =...
Platforms: *nix
License: Freeware | Size: 83.97 KB | Download (94): File::SmartNL Download |
perltoot is Toms object-oriented tutorial for perl. Object-oriented programming is a big seller these days. Some managers would rather have objects than sliced bread. Why is that? Whats so special about an object? Just what is an object anyway? An object is nothing but a way of tucking away...
Platforms: *nix
License: Freeware | Size: 12.2 MB | Download (94): perltoot Download |
C/Invoke is a library for connecting to C libraries at runtime. This differs from the typical method of interfacing with C, which involves writing static definitions which are then compiled to a machine-dependant format. C/Invoke provides a runtime facility to build descriptions of C functions...
Platforms: *nix
License: Freeware | Size: 71.68 KB | Download (94): C/Invoke Download |
Test::Resub is a lexically scoped subroutine replacement for testing. SYNOPSIS #!/usr/bin/perl use Test::More tests => 4; use Test::Resub qw(resub); { package Somewhere; sub show { my ($class, $message) = @_; return "$class, $message"; } } # sanity is( Somewhere->show(beyond the...
Platforms: *nix
License: Freeware | Size: 14.34 KB | Download (93): Test::Resub Download |
ReleaseAction - call actions upon release. SYNOPSIS use ReleaseAction on_release; { # OO style my $handle = ReleaseAction->new( sub {print "Exiting scopen"} ); print "In scopen"; } { # Functional style my $handle = on_release {print "Exiting scopen"}; print "In scopen"; } { my...
Platforms: *nix
License: Freeware | Size: 4.1 KB | Download (93): ReleaseAction Download |
Inline::C is a Perl module that can Write Perl Subroutines in C. Inline::C is a module that allows you to write Perl subroutines in C. Since version 0.30 the Inline module supports multiple programming languages and each language has its own support module. This document describes how to use...
Platforms: *nix
License: Freeware | Size: 92.16 KB | Download (93): Inline::C Download |
IO::Busy is a Perl module to intercept terminal input while something else is happening. SYNOPSIS use IO::Busy; my $fh = busy { non_interactive_stuff(); }; This module exports a single subroutine, named busy. That subroutine takes a single argument, which must be a block of code. busy...
Platforms: *nix
License: Freeware | Size: 4.1 KB | Download (93): IO::Busy Download |
Devel::DProf is a Perl code profiler. SYNOPSIS perl5 -d:DProf test.pl The Devel::DProf package is a Perl code profiler. This will collect information on the execution time of a Perl script and of the subs in that script. This information can be used to determine which subroutines are using...
Platforms: *nix
License: Freeware | Size: 20.48 KB | Download (93): Devel::DProf Download |
Sub::Curry is a Perl module to create curried subroutines. SYNOPSIS use Sub::Curry; use Sub::Curry qw/ :CONST curry /; # Import spice constants # and the &curry function. #my $f1 = Sub::Curry::->new(&foo, 1, 2); # Same as below. my $f1 = curry(&foo, 1, 2); my $f2 = $cb1->new(3, 4); my...
Platforms: *nix
License: Freeware | Size: 6.14 KB | Download (93): Sub::Curry Download |
Pod::Template is a Perl module for building pod documentation from templates. SYNOPSIS ### As a module ### use Pod::Template; my $parser = new Pod::Template; $parser->parse( template => documentation.ptmpl ); print $parser->as_string ### As a script ### $ podtmpl -I dir1 -I dir2...
Platforms: *nix
License: Freeware | Size: 8.19 KB | Download (93): Pod::Template Download |
File::AnySpec is a Perl module to perform operations on foreign (remote) file names. SYNOPSIS # Subroutine Interface # use File::AnySpec qw(fspec2fspec pm2fspec os2fspec fspec2os fspec_glob fspec2pm); $file = fspec2fspec($from_fspec, $to_fspec $fspec_file, [$nofile]) $os_file =...
Platforms: *nix
License: Freeware | Size: 44.03 KB | Download (93): File::AnySpec Download |
Tie::Eudora is a Perl module that can encode/decode emails, read/write emails in Eudora mailbox files. SYNOPSIS #### # Subroutine interface # $encoded_email = decode_record($mailbox_email); @email = decode_field($encoded_email); $encoded_email = encode_field (@email); $mailbox_email =...
Platforms: *nix
License: Freeware | Size: 66.56 KB | Download (93): Tie::Eudora Download |
Sub::DeferredPartial is a deferred evaluation / partial application. SYNOPSIS use Sub::DeferredPartial def; $S = def sub : P1 P2 P3 { %_=@_; join , @_{qw(P1 P2 P3)} }; print $S->( P1 => 1, P2 => 2, P3 => 3 )->(); # 123 $A = $S->( P3 => 1 ); # partial application $B = $S->( P3 => 2 );...
Platforms: *nix
License: Freeware | Size: 5.12 KB | Download (93): Sub::DeferredPartial Download |
Parallel::Queue is a Perl module to fork or thread a list of closures N-way parallel. SYNOPSIS # example queue: # only squish files larger than 8KB in size. figure # that the system can handle four copies of squish # running at the same time without them interfering # with one another....
Platforms: *nix
License: Freeware | Size: 8.19 KB | Download (93): Parallel::Queue Download |
Sub::PatMat can call a version of subroutine depending on its arguments. SYNOPSIS use Sub::PatMat; # basics: sub fact : when($_[0] <= 1) { 1 } sub fact { my ($n) = @_; $n*fact($n-1) } print fact(6); # referring to things other than @_: sub mysort : when($a < $b) { -1 } sub mysort :...
Platforms: *nix
License: Freeware | Size: 14.34 KB | Download (92): Sub::PatMat Download |
Tree::BPTree is a Perl implementation of B+ trees. SYNOPSIS use Tree::BPTree; # These arguments are actually the defaults my $tree = new Tree::BPTree( -n => 3, -unique => 0, -keycmp => sub { $_[0] cmp $_[1] }, -valuecmp => sub { $_[0] <=> $_[1] }, ); # index the entries in this...
Platforms: *nix
License: Freeware | Size: 17.41 KB | Download (92): Tree::BPTree Download |
Set::Infinite::Basic is a Perl module with sets of intervals. SYNOPSIS use Set::Infinite::Basic; $set = Set::Infinite::Basic->new(1,2); # [1..2] print $set->union(5,6); # [1..2],[5..6] Set::Infinite::Basic is a Set Theory module for infinite sets. It works on reals, integers, and...
Platforms: *nix
License: Freeware | Size: 49.15 KB | Download (92): Set::Infinite::Basic Download |
B::LintSubs is a Perl compiler backend to check sub linkage. SYNOPSIS perl -MO=LintSubs [FILE] [-e PROGRAM] When using use strict, subroutine names are not checked at the callsite; this makes the following a perfectly valid program at compiletime, that only blows up at runtime use strict;...
Platforms: *nix
License: Freeware | Size: 3.07 KB | Download (92): B::LintSubs Download |