Current Path : /usr/opt/perl530/man/man1/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //usr/opt/perl530/man/man1/perlsource.1 |
.\" 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 .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "PERLSOURCE 1" .TH PERLSOURCE 1 "2019-10-27" "perl v5.30.2" "Perl Programmers Reference Guide" .\" 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" perlsource \- A guide to the Perl source tree .SH "DESCRIPTION" .IX Header "DESCRIPTION" This document describes the layout of the Perl source tree. If you're hacking on the Perl core, this will help you find what you're looking for. .SH "FINDING YOUR WAY AROUND" .IX Header "FINDING YOUR WAY AROUND" The Perl source tree is big. Here's some of the thing you'll find in it: .SS "C code" .IX Subsection "C code" The C source code and header files mostly live in the root of the source tree. There are a few platform-specific directories which contain C code. In addition, some of the modules shipped with Perl include C or \s-1XS\s0 code. .PP See perlinterp for more details on the files that make up the Perl interpreter, as well as details on how it works. .SS "Core modules" .IX Subsection "Core modules" Modules shipped as part of the Perl core live in four subdirectories. Two of these directories contain modules that live in the core, and two contain modules that can also be released separately on \s-1CPAN.\s0 Modules which can be released on cpan are known as \*(L"dual-life\*(R" modules. .IP "\(bu" 4 \&\fIlib/\fR .Sp This directory contains pure-Perl modules which are only released as part of the core. This directory contains \fIall\fR of the modules and their tests, unlike other core modules. .IP "\(bu" 4 \&\fIext/\fR .Sp Like \fIlib/\fR, this directory contains modules which are only released as part of the core. Unlike \fIlib/\fR, however, a module under \fIext/\fR generally has a CPAN-style directory\- and file-layout and its own \&\fIMakefile.PL\fR. There is no expectation that a module under \fIext/\fR will work with earlier versions of Perl 5. Hence, such a module may take full advantage of syntactical and other improvements in Perl 5 blead. .IP "\(bu" 4 \&\fIdist/\fR .Sp This directory is for dual-life modules where the blead source is canonical. Note that some modules in this directory may not yet have been released separately on \s-1CPAN.\s0 Modules under \fIdist/\fR should make an effort to work with earlier versions of Perl 5. .IP "\(bu" 4 \&\fIcpan/\fR .Sp This directory contains dual-life modules where the \s-1CPAN\s0 module is canonical. Do not patch these modules directly! Changes to these modules should be submitted to the maintainer of the \s-1CPAN\s0 module. Once those changes are applied and released, the new version of the module will be incorporated into the core. .PP For some dual-life modules, it has not yet been determined if the \s-1CPAN\s0 version or the blead source is canonical. Until that is done, those modules should be in \fIcpan/\fR. .SS "Tests" .IX Subsection "Tests" The Perl core has an extensive test suite. If you add new tests (or new modules with tests), you may need to update the \fIt/TEST\fR file so that the tests are run. .IP "\(bu" 4 Module tests .Sp Tests for core modules in the \fIlib/\fR directory are right next to the module itself. For example, we have \fIlib/strict.pm\fR and \&\fIlib/strict.t\fR. .Sp Tests for modules in \fIext/\fR and the dual-life modules are in \fIt/\fR subdirectories for each module, like a standard \s-1CPAN\s0 distribution. .IP "\(bu" 4 \&\fIt/base/\fR .Sp Tests for the absolute basic functionality of Perl. This includes \&\f(CW\*(C`if\*(C'\fR, basic file reads and writes, simple regexes, etc. These are run first in the test suite and if any of them fail, something is \fIreally\fR broken. .IP "\(bu" 4 \&\fIt/cmd/\fR .Sp Tests for basic control structures, \f(CW\*(C`if\*(C'\fR/\f(CW\*(C`else\*(C'\fR, \f(CW\*(C`while\*(C'\fR, subroutines, etc. .IP "\(bu" 4 \&\fIt/comp/\fR .Sp Tests for basic issues of how Perl parses and compiles itself. .IP "\(bu" 4 \&\fIt/io/\fR .Sp Tests for built-in \s-1IO\s0 functions, including command line arguments. .IP "\(bu" 4 \&\fIt/mro/\fR .Sp Tests for perl's method resolution order implementations (see mro). .IP "\(bu" 4 \&\fIt/op/\fR .Sp Tests for perl's built in functions that don't fit into any of the other directories. .IP "\(bu" 4 \&\fIt/opbasic/\fR .Sp Tests for perl's built in functions which, like those in \fIt/op/\fR, do not fit into any of the other directories, but which, in addition, cannot use \fIt/test.pl\fR,as that program depends on functionality which the test file itself is testing. .IP "\(bu" 4 \&\fIt/re/\fR .Sp Tests for regex related functions or behaviour. (These used to live in t/op). .IP "\(bu" 4 \&\fIt/run/\fR .Sp Tests for features of how perl actually runs, including exit codes and handling of PERL* environment variables. .IP "\(bu" 4 \&\fIt/uni/\fR .Sp Tests for the core support of Unicode. .IP "\(bu" 4 \&\fIt/win32/\fR .Sp Windows-specific tests. .IP "\(bu" 4 \&\fIt/porting/\fR .Sp Tests the state of the source tree for various common errors. For example, it tests that everyone who is listed in the git log has a corresponding entry in the \fI\s-1AUTHORS\s0\fR file. .IP "\(bu" 4 \&\fIt/lib/\fR .Sp The old home for the module tests, you shouldn't put anything new in here. There are still some bits and pieces hanging around in here that need to be moved. Perhaps you could move them? Thanks! .SS "Documentation" .IX Subsection "Documentation" All of the core documentation intended for end users lives in \fIpod/\fR. Individual modules in \fIlib/\fR, \fIext/\fR, \fIdist/\fR, and \fIcpan/\fR usually have their own documentation, either in the \fIModule.pm\fR file or an accompanying \fIModule.pod\fR file. .PP Finally, documentation intended for core Perl developers lives in the \&\fIPorting/\fR directory. .SS "Hacking tools and documentation" .IX Subsection "Hacking tools and documentation" The \fIPorting\fR directory contains a grab bag of code and documentation intended to help porters work on Perl. Some of the highlights include: .IP "\(bu" 4 \&\fIcheck*\fR .Sp These are scripts which will check the source things like \s-1ANSI C\s0 violations, \s-1POD\s0 encoding issues, etc. .IP "\(bu" 4 \&\fIMaintainers\fR, \fIMaintainers.pl\fR, and \fIMaintainers.pm\fR .Sp These files contain information on who maintains which modules. Run \&\f(CW\*(C`perl Porting/Maintainers \-M Module::Name\*(C'\fR to find out more information about a dual-life module. .IP "\(bu" 4 \&\fIpodtidy\fR .Sp Tidies a pod file. It's a good idea to run this on a pod file you've patched. .SS "Build system" .IX Subsection "Build system" The Perl build system starts with the \fIConfigure\fR script in the root directory. .PP Platform-specific pieces of the build system also live in platform-specific directories like \fIwin32/\fR, \fIvms/\fR, etc. .PP The \fIConfigure\fR script is ultimately responsible for generating a \&\fIMakefile\fR. .PP The build system that Perl uses is called metaconfig. This system is maintained separately from the Perl core. .PP The metaconfig system has its own git repository. Please see its \s-1README\s0 file in <https://github.com/Perl/metaconfig> for more details. .PP The \fICross\fR directory contains various files related to cross-compiling Perl. See \fICross/README\fR for more details. .SS "\fI\s-1AUTHORS\s0\fP" .IX Subsection "AUTHORS" This file lists everyone who's contributed to Perl. If you submit a patch, you should add your name to this file as part of the patch. .SS "\fI\s-1MANIFEST\s0\fP" .IX Subsection "MANIFEST" The \fI\s-1MANIFEST\s0\fR file in the root of the source tree contains a list of every file in the Perl core, as well as a brief description of each file. .PP You can get an overview of all the files with this command: .PP .Vb 1 \& % perl \-lne \*(Aqprint if /^[^\e/]+\e.[ch]\es+/\*(Aq MANIFEST .Ve