1Type::Tiny::Manual::InsUtsaelrlaCtoinotnr(i3b)uted PerlTDyopceu:m:eTnitnayt:i:oMnanual::Installation(3)
2
3
4

NAME

6       Type::Tiny::Manual::Installation - how to install Type::Tiny
7

MANUAL

9       Installing Type-Tiny should be straightforward.
10
11   Installation with cpanminus
12       If you have cpanm, you only need one line:
13
14         % cpanm Type::Tiny
15
16       If you are installing into a system-wide directory, you may need to
17       pass the "-S" flag to cpanm, which uses sudo to install the module:
18
19         % cpanm -S Type::Tiny
20
21   Installation with the CPAN Shell
22       Alternatively, if your CPAN shell is set up, you should just be able to
23       do:
24
25         % cpan Type::Tiny
26
27   Manual Installation
28       As a last resort, you can manually install it. Download the tarball and
29       unpack it.
30
31       Consult the file META.json for a list of pre-requisites. Install these
32       first.
33
34       To build Type-Tiny:
35
36         % perl Makefile.PL
37         % make && make test
38
39       Then install it:
40
41         % make install
42
43       If you are installing into a system-wide directory, you may need to
44       run:
45
46         % sudo make install
47
48   Dependencies
49       Type::Tiny requires at least Perl 5.6.1, though certain Unicode-related
50       features (e.g. non-ASCII type constraint names) may work better in
51       newer versions of Perl.
52
53       Type::Tiny requires Exporter::Tiny, a module that was previously
54       bundled in this distribution, but has since been spun off as a separate
55       distribution. Don't worry - it's quick and easy to install.
56
57       At run-time, Type::Tiny also requires the following modules: B,
58       B::Deparse, Carp, Data::Dumper, Scalar::Util, Text::Balanced, overload,
59       strict and warnings. All of these come bundled with Perl itself. Prior
60       to Perl 5.8, Scalar::Util and Text::Balanced do not come bundled with
61       Perl and will need installing separately from the CPAN.
62
63       Certain features require additional modules. Tying a variable to a type
64       constraint (e.g. "tie my $count, Int") requires Type::Tie; stack traces
65       on exceptions require Devel::StackTrace. The Reply::Plugin::TypeTiny
66       plugin for Reply requires Reply (obviously). Devel::LexAlias may
67       slightly increase the speed of some of Type::Tiny's compiled coderefs.
68
69       Type::Tiny::XS is not required, but if available provides a speed boost
70       for some type checks. (Setting the environment variable
71       "PERL_TYPE_TINY_XS" to false, or setting "PERL_ONLY" to true will
72       suppress the use of Type::Tiny::XS, even if it is available.)
73
74       The test suite additionally requires Test::More, Test::Fatal and
75       Test::Requires. Test::More comes bundled with Perl, but if you are
76       using a version of Perl older than 5.14, you will need to upgrade to at
77       least Test::More version 0.96. Test::Requires and Test::Fatal (plus
78       Try::Tiny which Test::Fatal depends on) are bundled with Type::Tiny in
79       the "inc" directory, so you do not need to install them separately.
80
81       If using Type::Tiny in conjunction with Moo, then at least Moo 1.006000
82       is recommended. If using Type::Tiny with Moose, then at least Moose
83       2.0000 is recommended. If using Type::Tiny with Mouse, then at least
84       Mouse 1.00 is recommended. Type::Tiny is mostly untested against older
85       versions of these packages.
86
87       Type::Tiny and cperl
88
89       cperl <http://perl11.org/cperl/> is an extended version of Perl with
90       various incompatible changes from the official Perl 5 releases.
91
92       As of Type::Tiny 1.010001, cperl is a supported platform for Type::Tiny
93       with some caveats. At the time of writing, Moose will not install on
94       the latest cperl releases, so using Type::Tiny with Moose on cperl is
95       untested. Moo can be forced to install, and Type::Tiny is verified to
96       work with Moo on cperl.  cperl not only enables a new warnings category
97       called "shadow" (which is good; they're potentially useful) but
98       switches on shadow warnings by default (which is annoying). Type::Tiny
99       does not (and likely will never) attempt to work around these warnings.
100       If the warnings bother you, you should be able to catch them using
101       $SIG{__WARN__}. Certain features of Eval::TypeTiny are broken under
102       cperl, but they're not thought to have any practical effect on
103       Type::Tiny or its other bundled modules.
104

NEXT STEPS

106       Here's your next step:
107
108       ยท   Type::Tiny::Manual::UsingWithMoo
109
110           Basic use of Type::Tiny with Moo, including attribute type
111           constraints, parameterized type constraints, coercions, and method
112           parameter checking.
113

AUTHOR

115       Toby Inkster <tobyink@cpan.org>.
116
118       This software is copyright (c) 2013-2014, 2017-2020 by Toby Inkster.
119
120       This is free software; you can redistribute it and/or modify it under
121       the same terms as the Perl 5 programming language system itself.
122

DISCLAIMER OF WARRANTIES

124       THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
125       WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
126       MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
127
128
129
130perl v5.32.0                      2020-09-17Type::Tiny::Manual::Installation(3)
Impressum