-
-
24 May 2021 11:36:26 UTC
- Distribution: FunctionalPerl
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Repository
- Issues (0)
- Testers (100 / 2 / 13)
- 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::Struct::Show -- automatic Show protocol implementation
SYNOPSIS
package FP_Struct_Show_Example::Foo { use FP::Struct ["a","b"], 'FP::Struct::Show'; _END_ } FP_Struct_Show_Example::Foo::constructors->import; use FP::Show; is( show(Foo(1,1+1)), "Foo(1, 2)" ); # Whereas the default: package FP_Struct_Show_Example::Bar { use FP::Struct ["a","b"]; _END_ } FP_Struct_Show_Example::Bar::constructors->import; use FP::Show; is( show(Bar(1, 2)), "bless(+{a => 1, b => 2}, 'FP_Struct_Show_Example::Bar')" );
DESCRIPTION
This class, when listed as a superclass of an FP::Struct, automatically implements the FP::Abstract::Show protocol (i.e. generates an `FP_Show_show` method that uses inspection specific to FP::Struct classes to get to know the public field values of the object it is being called on, and reconstructs a constructor call based on this information.) For the typical `FP::Struct` based class that don't have a preferred custom constructor this will be the right thing.
SEE ALSO
Creates implementations for: FP::Abstract::Show
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.