-
-
24 May 2021 11:36:26 UTC
- Distribution: FunctionalPerl
- Module version: 0.72.66
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Repository
- Issues (0)
- Testers (69 / 1 / 0)
- Kwalitee
Bus factor: 1- License: perl_5
- Perl: v5.16.4
- Activity
24 month- Tools
- Download (443.46KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 1 contributors-
Christian Jaeger
- Dependencies
- Digest
- File::Path
- Getopt::Long
- Import::Into
- Math::BigInt
- NEXT
- PerlIO::utf8_strict
- Safe::Isa
- Scalar::Util
- Symbol
- Test::More
- autobox
- base
- overload
- utf8
- warnings
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
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
Allows 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. (It also has one normal export: `expand_import_tags`, see below.)
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:
use FunctionalPerl qw(expand_import_tags); my ($modules, $unused_tags, $nontags) = expand_import_tags(qw(:dev :most not_a_tag)); is $$modules{"FP::Failure"}, 2; # number of times used. is_deeply $unused_tags, [':all', ':ast', ':csv', ':dbi', ':fix', ':git', ':io', ':paths', ':pxml', ':rare', ':trampolines', ':transparentlazy']; is_deeply $nontags, ['not_a_tag'];
SEE ALSO
This is the list of supported import tags and the modules and other tags that they import:
:all
->:dev
,:io
,:most
,:rare
:ast
-> FP::AST::Perl: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:failures
-> FP::Either, FP::Failure:fix
-> FP::fix:functions
->:equal
,:failures
,:show
, FP::Combinators, FP::Combinators2, FP::Currying, FP::Div, FP::Memoizing, FP::Ops, FP::Optional, FP::Predicates, FP::Untainted, FP::Values: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
->:streams
, FP::Lazy, FP::Weak:maps
-> FP::Hash, FP::PureHash:most
->:autobox
,:datastructures
,:debug
,:doc
,:equal
,:failures
,:functions
,:lazy
,:show
:numbers
-> FP::BigInt:paths
-> FP::Path:pxml
-> PXML::Serialize, PXML::Util, PXML::XHTML:rare
->:csv
,:dbi
,:fix
,:git
,:paths
,:trampolines
:repl
-> FP::Repl, FP::Repl::AutoTrap:sequences
->:streams
, FP::Array, FP::Array_sort, FP::List, FP::MutableArray, FP::PureArray, FP::SortedPureArray, FP::StrictList:sets
-> FP::HashSet, FP::OrderedCollection:show
-> FP::Show:streams
-> FP::IOStream, FP::Stream, FP::Weak:test
-> Chj::TEST:trampolines
-> FP::Trampoline:transparentlazy
->:streams
, FP::TransparentLazy, FP::Weak:tries
-> FP::TrieNOTE
This is alpha software! Read the status section in the package README or on the website.
Module Install Instructions
To install FunctionalPerl, copy and paste the appropriate command in to your terminal.
cpanm FunctionalPerl
perl -MCPAN -e shell install FunctionalPerl
For more information on module installation, please visit the detailed CPAN module installation guide.