NAME
FunctionalPerl - functional programming in Perl
SYNOPSIS
use FunctionalPerl;
FunctionalPerl->VERSION # or $FunctionalPerl::VERSION
# The actual modules are in the FP:: namespace hierarchy, like:
use FP::List;
# But you can also import sets of modules from here, e.g.:
use FunctionalPerl qw(:sequences :repl);
DESCRIPTION
Allow Perl programs to be written with fewer side effects.
See the Functional Perl home page.
EXPORTS
FunctionalPerl also acts as a convenience re-exporter, offering tags to load sets of modules.
Note that the tags and the sets of modules are very much alpha. If you want to have a better chance of code not breaking, import the modules you want directly.
Tags can be expanded via:
my ($modules, $unused_tags)= FunctionalPerl::expand(qw(:dev :most));
is $$modules{"FP::Failure"}, 2; # number of times used.
use FP::Equal 'is_equal';
is_equal $unused_tags,
[':all', ':csv', ':dbi', ':fix', ':git', ':io', ':path', ':pxml', ':rare', ':trampoline', ':transparentlazy'];
SEE ALSO
This is the list of supported import tags and the modules that they import:
:all: :dev, :io, :most, :rare
:autobox: FP::autobox
:chars: FP::Char
:csv: FP::Text::CSV
:datastructures: :chars, :maps, :numbers, :sequences, :sets, :tries
:dbi: FP::DBI
:debug: :equal, :show, Chj::Backtrace, Chj::pp, Chj::time_this
:dev: :debug, :repl, :test, Chj::ruse
:doc: FP::Docstring
:equal: FP::Equal
:failure: FP::Failure
:fix: FP::fix
:functions: :equal, :failure, :show, FP::Combinators, FP::Div, FP::Memoizing, FP::Ops, FP::Optional, FP::Predicates, FP::Untainted, FP::Values, FP::uncurry
:git: FP::Git::Repository
:io: Chj::tempdir, Chj::xIO, Chj::xhome, Chj::xopen, Chj::xopendir, Chj::xoutpipe, Chj::xperlfunc, Chj::xpipe, Chj::xtmpfile, FP::IOStream
:lazy: :stream, FP::Lazy, FP::Weak
:maps: FP::Hash, FP::PureHash
:most: :autobox, :datastructures, :debug, :doc, :equal, :failure, :functions, :lazy, :show
:numbers: FP::BigInt
:path: FP::Path
:pxml: PXML::Serialize, PXML::Util, PXML::XHTML
:rare: :csv, :dbi, :fix, :git, :path, :trampoline
:repl: FP::Repl, FP::Repl::AutoTrap
:sequences: :stream, FP::Array, FP::Array_sort, FP::List, FP::MutableArray, FP::PureArray, FP::StrictList
:sets: FP::HashSet, FP::OrderedCollection
:show: FP::Show
:stream: FP::IOStream, FP::Stream, FP::Weak
:test: Chj::TEST
:trampoline: FP::Trampoline
:transparentlazy: :stream, FP::TransparentLazy, FP::Weak
:tries: FP::Trie
NOTE
This is alpha software! Read the status section in the package README or on the website.