-
-
24 May 2021 11:36:26 UTC
- Distribution: FunctionalPerl
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Repository
- Issues (0)
- Testers (70 / 2 / 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
FP::Abstract::Show - data constructor protocol
SYNOPSIS
package FPShowExample::Foo { sub new { my $class = shift; bless [@_], $class } sub FP_Show_show { my ($self, $show) = @_; # $show is for recursive use "FPShowExample::Foo->new(".join(", ", map { $show->($_) } @$self).")" } } use FP::Show; is show(FPShowExample::Foo->new("hey", new FPShowExample::Foo 5+5)), "FPShowExample::Foo->new('hey', FPShowExample::Foo->new(10))";
DESCRIPTION
For an introduction, see FP::Show.
The reason that
FP_Show_show
is getting a$show
argument is to provide for (probably evil, though) context sensitive formatting, but more importantly to hopefully enable to do pretty-printing and cut-off features (this is *alpha* though, see whether this works out).TODO
Handle circular data structures.
Pretty-printing -- for this, probably move to returning FP::AST::Perl nodes instead of strings.
Declare that non-pretty-printing show must only print one line?
Cut-offs at configurable size
Configuration for whether to force promises
SEE ALSO
FP::Show -- functions to access this protocol usefully
FP::Mixin::Utils -- implemented by this protocol
NOTE
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.