.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" 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 .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . 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 "Mouse::XS 3pm" .TH Mouse::XS 3pm 2024-03-07 "perl v5.38.2" "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 Mouse::XS \- A Mouse guts in XS .SH VERSION .IX Header "VERSION" This document describes Mouse version 2.0.0 .SH DESCRIPTION .IX Header "DESCRIPTION" Mouse has an optional XS implementation, which is automatically built and used if available. According to benchmarks, this is about 2 times faster than Mouse::PurePerl. .SS INSTALL .IX Subsection "INSTALL" The XS implementation are selected by default, but you can force it by passing the \f(CW\*(C`\-\-xs\*(C'\fR option to \fIMakefile.PL\fR. .PP .Vb 1 \& perl Makefile.PL \-\-xs .Ve .PP If you do not want to build the XS implementation, you can pass the \f(CW\*(C`\-\-pp\*(C'\fR option to \fIMakefile.PL\fR. .PP .Vb 1 \& perl Makefile.PL \-\-pp .Ve .PP Or if you use \f(CW\*(C`cpanm\*(C'\fR (>= 1.7), you can give \f(CW\*(C`\-\-pp\*(C'\fR option to \f(CW\*(C`cpanm\*(C'\fR. .PP .Vb 1 \& cpanm \-\-pp Mouse .Ve .SS "The MOUSE_PUREPERL (or PERL_ONLY) environment variable" .IX Subsection "The MOUSE_PUREPERL (or PERL_ONLY) environment variable" It can be used to enable the use of Mouse::PurePerl in order to test and debug programs that use Mouse. .SH CAVEAT .IX Header "CAVEAT" There are some Mouse::XS specific features. .IP "Mutating references to the return values of getters" 4 .IX Item "Mutating references to the return values of getters" When you take a reference from Mouse getters, like \f(CW\*(C`$ref = \e$obj\->foo\*(C'\fR, the \f(CW$ref\fR refers \f(CW\*(C`\e$obj\->{foo}\*(C'\fR. That is, mutating \f(CW$$ref\fR also alters \f(CW\*(C`$obj\->{foo}\*(C'\fR. The behavior may confuse you so you'd better avoid to take a reference directly from getters. .Sp See for details. .SH DEPENDENCIES .IX Header "DEPENDENCIES" The XS implementation requires Perl 5.8.1 or later, and a C compiler. .SH "SEE ALSO" .IX Header "SEE ALSO" Mouse .PP Mouse::PurePerl