HEX
Server: Apache
System: Linux s198.coreserver.jp 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC 2025 x86_64
User: nagasaki (10062)
PHP: 7.1.33
Disabled: NONE
Upload Files
File: //usr/local/share/man/man3/Type::Tiny::Manual::Installation.3pm
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
.    ds C`
.    ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
.    if \nF \{\
.        de IX
.        tm Index:\\$1\t\\n%\t"\\$2"
..
.        if !\nF==2 \{\
.            nr % 0
.            nr F 2
.        \}
.    \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "Type::Tiny::Manual::Installation 3"
.TH Type::Tiny::Manual::Installation 3 "2021-07-31" "perl v5.26.3" "User Contributed Perl Documentation"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
Type::Tiny::Manual::Installation \- how to install Type::Tiny
.SH "MANUAL"
.IX Header "MANUAL"
Installing Type-Tiny should be straightforward.
.SS "Installation with cpanminus"
.IX Subsection "Installation with cpanminus"
If you have cpanm, you only need one line:
.PP
.Vb 1
\&  % cpanm Type::Tiny
.Ve
.PP
If you are installing into a system-wide directory, you may need to pass
the \*(L"\-S\*(R" flag to cpanm, which uses sudo to install the module:
.PP
.Vb 1
\&  % cpanm \-S Type::Tiny
.Ve
.SS "Installation with the \s-1CPAN\s0 Shell"
.IX Subsection "Installation with the CPAN Shell"
Alternatively, if your \s-1CPAN\s0 shell is set up, you should just be able to
do:
.PP
.Vb 1
\&  % cpan Type::Tiny
.Ve
.SS "Manual Installation"
.IX Subsection "Manual Installation"
As a last resort, you can manually install it. Download the tarball and
unpack it.
.PP
Consult the file \s-1META\s0.json for a list of pre-requisites. Install these
first.
.PP
To build Type-Tiny:
.PP
.Vb 2
\&  % perl Makefile.PL
\&  % make && make test
.Ve
.PP
Then install it:
.PP
.Vb 1
\&  % make install
.Ve
.PP
If you are installing into a system-wide directory, you may need to run:
.PP
.Vb 1
\&  % sudo make install
.Ve
.SS "Dependencies"
.IX Subsection "Dependencies"
Type::Tiny requires at least Perl 5.6.1, though certain Unicode-related
features (e.g. non-ASCII type constraint names) may work better in newer
versions of Perl.
.PP
Type::Tiny requires Exporter::Tiny, a module that was previously
bundled in this distribution, but has since been spun off as a separate
distribution. Don't worry \- it's quick and easy to install.
.PP
At run-time, Type::Tiny also requires the following modules: B,
B::Deparse, Carp, Data::Dumper, Scalar::Util, Text::Balanced,
overload, strict and warnings. All of these come bundled with
Perl itself. Prior to Perl 5.8, Scalar::Util and Text::Balanced
do not come bundled with Perl and will need installing separately from
the \s-1CPAN.\s0
.PP
Certain features require additional modules. Tying a variable to a
type constraint (e.g. \f(CW\*(C`tie my $count, Int\*(C'\fR) requires Type::Tie;
stack traces on exceptions require Devel::StackTrace. The
Reply::Plugin::TypeTiny plugin for Reply requires Reply
(obviously). Devel::LexAlias may \fIslightly\fR increase the speed
of some of Type::Tiny's compiled coderefs.
.PP
Type::Tiny::XS is not required, but if available provides a speed
boost for some type checks. (Setting the environment variable
\&\f(CW\*(C`PERL_TYPE_TINY_XS\*(C'\fR to false, or setting \f(CW\*(C`PERL_ONLY\*(C'\fR to true will
suppress the use of Type::Tiny::XS, even if it is available.)
.PP
The test suite additionally requires Test::More, Test::Fatal
and Test::Requires. Test::More comes bundled with Perl, but if
you are using a version of Perl older than 5.14, you will need to
upgrade to at least Test::More version 0.96. Test::Requires and
Test::Fatal (plus Try::Tiny which Test::Fatal depends on) are bundled
with Type::Tiny in the \f(CW\*(C`inc\*(C'\fR directory, so you do not need to
install them separately.
.PP
If using Type::Tiny in conjunction with Moo, then at least Moo
1.006000 is recommended. If using Type::Tiny with Moose, then at
least Moose 2.0000 is recommended. If using Type::Tiny with Mouse,
then at least Mouse 1.00 is recommended. Type::Tiny is mostly
untested against older versions of these packages.
.PP
\fIType::Tiny and cperl\fR
.IX Subsection "Type::Tiny and cperl"
.PP
cperl <http://perl11.org/cperl/> is an extended version of Perl with
various incompatible changes from the official Perl 5 releases.
.PP
As of Type::Tiny 1.010001, cperl is a supported platform for Type::Tiny with
some caveats. At the time of writing, Moose will not install on the latest
cperl releases, so using Type::Tiny with Moose on cperl is untested. Moo can
be forced to install, and Type::Tiny is verified to work with Moo on cperl.
cperl not only enables a new warnings category called \*(L"shadow\*(R" (which is good;
they're potentially useful) but switches on shadow warnings by default (which
is annoying). Type::Tiny does not (and likely will never) attempt to work
around these warnings. If the warnings bother you, you should be able to catch
them using \f(CW$SIG{_\|_WARN_\|_}\fR. Certain features of Eval::TypeTiny are
broken under cperl, but they're not thought to have any practical effect on
Type::Tiny or its other bundled modules.
.SH "NEXT STEPS"
.IX Header "NEXT STEPS"
Here's your next step:
.IP "\(bu" 4
Type::Tiny::Manual::UsingWithMoo
.Sp
Basic use of Type::Tiny with Moo, including attribute type constraints,
parameterized type constraints, coercions, and method parameter checking.
.SH "AUTHOR"
.IX Header "AUTHOR"
Toby Inkster <tobyink@cpan.org>.
.SH "COPYRIGHT AND LICENCE"
.IX Header "COPYRIGHT AND LICENCE"
This software is copyright (c) 2013\-2014, 2017\-2021 by Toby Inkster.
.PP
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
.SH "DISCLAIMER OF WARRANTIES"
.IX Header "DISCLAIMER OF WARRANTIES"
\&\s-1THIS PACKAGE IS PROVIDED \*(L"AS IS\*(R" AND WITHOUT ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.\s0