.\" Automatically generated by Pod::Man 4.09 (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 .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "Dist::Zilla::Plugin::PkgVersion 3pm" .TH Dist::Zilla::Plugin::PkgVersion 3pm "2018-05-07" "perl v5.26.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" Dist::Zilla::Plugin::PkgVersion \- add a $VERSION to your packages .SH "VERSION" .IX Header "VERSION" version 6.012 .SH "SYNOPSIS" .IX Header "SYNOPSIS" in dist.ini .PP .Vb 1 \& [PkgVersion] .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This plugin will add lines like the following to each package in each Perl module or program (more or less) within the distribution: .PP .Vb 1 \& $MyModule::VERSION = \*(Aq0.001\*(Aq; .Ve .PP or .PP .Vb 1 \& { our $VERSION = \*(Aq0.001\*(Aq; } .Ve .PP \&...where 0.001 is the version of the dist, and MyModule is the name of the package being given a version. (In other words, it always uses fully-qualified names to assign versions.) .PP It will skip any package declaration that includes a newline between the \&\f(CW\*(C`package\*(C'\fR keyword and the package name, like: .PP .Vb 2 \& package \& Foo::Bar; .Ve .PP This sort of declaration is also ignored by the \s-1CPAN\s0 toolchain, and is typically used when doing monkey patching or other tricky things. .SH "ATTRIBUTES" .IX Header "ATTRIBUTES" .SS "die_on_existing_version" .IX Subsection "die_on_existing_version" If true, then when PkgVersion sees an existing \f(CW$VERSION\fR assignment, it will throw an exception rather than skip the file. This attribute defaults to false. .SS "die_on_line_insertion" .IX Subsection "die_on_line_insertion" By default, PkgVersion looks for a blank line after each \f(CW\*(C`package\*(C'\fR statement. If it finds one, it inserts the \f(CW$VERSION\fR assignment on that line. If it doesn't, it will insert a new line, which means the shipped copy of the module will have different line numbers (off by one) than the source. If \&\f(CW\*(C`die_on_line_insertion\*(C'\fR is true, PkgVersion will raise an exception rather than insert a new line. .SS "use_package" .IX Subsection "use_package" This option, if true, will not insert an assignment to \f(CW$VERSION\fR but will replace the existing \f(CW\*(C`package\*(C'\fR declaration with one that includes a version like: .PP .Vb 1 \& package Module::Name 0.001; .Ve .SS "use_our" .IX Subsection "use_our" The idea here was to insert \f(CW\*(C`{ our $VERSION = \*(Aq0.001\*(Aq; }\*(C'\fR instead of \f(CW\*(C`$Module::Name::VERSION = \*(Aq0.001\*(Aq;\*(C'\fR. It turns out that this causes problems with some analyzers. Use of this feature is deprecated. .PP Something else will replace it in the future. .SS "use_begin" .IX Subsection "use_begin" If true, the version assignment is wrapped in a \s-1BEGIN\s0 block. This may help in rare cases, such as when DynaLoader has to be called at \s-1BEGIN\s0 time, and requires \s-1VERSION.\s0 This option should be needed rarely. .PP Also note that assigning to \f(CW$VERSION\fR before the module has finished compiling can lead to confused behavior with attempts to determine whether a module was successfully loaded on perl v5.8. .SS "finder" .IX Subsection "finder" This is the name of a FileFinder for finding modules to edit. The default value is \f(CW\*(C`:InstallModules\*(C'\fR and \f(CW\*(C`:ExecFiles\*(C'\fR; this option can be used more than once. .PP Other predefined finders are listed in \&\*(L"default_finders\*(R" in Dist::Zilla::Role::FileFinderUser. You can define your own with the [FileFinder::ByName] and [FileFinder::Filter] plugins. .SH "SEE ALSO" .IX Header "SEE ALSO" Core Dist::Zilla plugins: PodVersion, AutoVersion, NextRelease. .PP Other Dist::Zilla plugins: OurPkgVersion inserts version numbers using \f(CW\*(C`our $VERSION = \*(Aq...\*(Aq;\*(C'\fR and without changing line numbers .SH "AUTHOR" .IX Header "AUTHOR" Ricardo \s-1SIGNES\s0 😏 .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2018 by Ricardo \s-1SIGNES.\s0 .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.