-
-
08 Nov 2020 16:08:49 UTC
- Distribution: Z
- Module version: 0.008
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues
- Testers (84 / 0 / 0)
- Kwalitee
Bus factor: 1- 61.42% Coverage
- License: perl_5
- Perl: v5.8.8
- Activity
24 month- Tools
- Download (23.84KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Import::Into
- List::Util
- Module::Runtime
- Object::Adhoc
- Path::Tiny
- Syntax::Keyword::Try
- Try::Tiny
- Type::Tie
- Types::Common::Numeric
- Types::Common::String
- Types::Path::Tiny
- Types::Standard
- Zydeco::Lite
- match::simple
- namespace::autoclean
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Z - collection of modules for rapid app development
SYNOPSIS
This:
use Z;
Is a shortcut for:
use strict; use warnings; use feature 'say', 'state'; use namespace::autoclean; use Syntax::Keyword::Try 'try'; use Zydeco::Lite -all; use Path::Tiny 'path'; use Object::Adhoc 'object'; use match::simple 'match'; use Types::Standard -types, -is, -assert; use Types::Common::String -types, -is, -assert; use Types::Common::Numeric -types, -is, -assert; use Types::Path::Tiny -types, -is, -assert;
It will also do
no indirect
if indirect is installed.DESCRIPTION
Just a shortcut for loading a bunch of modules that allow you to quickly code Perl stuff. I've tried to avoid too many domain-specific modules like HTTP::Tiny, etc. The modules chosen should be broadly useful for a wide variety of tasks.
Perl Version Compatibility
By default, Z requires Perl v5.14, but it has a compatibility mode where for Perl v5.8.8 and above.
It will use Try::Tiny instead of Syntax::Keyword::Try. (Bear in mind that these are not 100% compatible with each other.) It will also load Perl6::Say as a fallback for the
say
built-in. And it will not providestate
. It will also load UNIVERSAL::DOES if there's no built-in UNIVERSAL::DOES method.You can specify whether you want the modern modules or the compatibility modules:
use Z -modern; # Uses modern modules. # Requres Perl 5.14+. use Z -compat; # Uses compatible modules. # Requires Perl 5.8.8+. use Z -detect; # Uses modern modules on Perl 5.14+. # Prints a warning and uses compatible modules on Perl 5.8.8+.
The default is
-modern
.Additional Functions
There are a whole bunch of other useful functions that Z could make available, but it's hard to know the best place to draw the line. So other functions are available on request:
use Z qw( weaken unweaken isweak ); use Z -compat, qw( pairmap pairgrep ); # Rename functions... use Z qw( pairmap:pmap pairgrep:pgrep );
(The things listed in the "SYNOPSIS" are always imported and don't support the renaming feature.)
The additional functions available are: everything from Scalar::Util, everything from List::Util, everything from Sub::Util, everything from Carp (wrapped versions with
sprintf
functionality, exceptconfess
which is part of the standard set of functions already), all the functions (but not the exported regexps) from Module::Runtime,Dumper
from Data::Dumper,maybe
andprovided
from PerlX::Maybe,encode_json
anddecode_json
from JSON::MaybeXS or JSON::PP (depending which is installed), andSTRICT
andLAX
from Devel::StrictMode.If you specify a compatibility mode (like
-modern
), this must be first in the import list.BUGS
Please report any bugs to http://rt.cpan.org/Dist/Display.html?Queue=Z.
SEE ALSO
Zydeco::Lite, Types::Standard, Syntax::Feature::Try, Path::Tiny, match::simple, Object::Adhoc.
AUTHOR
Toby Inkster <tobyink@cpan.org>.
COPYRIGHT AND LICENCE
This software is copyright (c) 2020 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
DISCLAIMER OF WARRANTIES
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Module Install Instructions
To install Z, copy and paste the appropriate command in to your terminal.
cpanm Z
perl -MCPAN -e shell install Z
For more information on module installation, please visit the detailed CPAN module installation guide.