.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32) .\" .\" 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 "PerlReq::Utils 3pm" .TH PerlReq::Utils 3pm "2015-08-20" "perl v5.24.1" "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" PerlReq::Utils \- auxiliary routines for B::PerlReq, perl.req and perl.prov .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module provides the following convenience functions: .IP "\fBpath2mod\fR" 4 .IX Item "path2mod" Convert file path to module name, e.g. \fIFile/Find.pm\fR \-> \fIFile::Find\fR. .IP "\fBmod2path\fR" 4 .IX Item "mod2path" Convert module name to file path, e.g. \fIFile::Find\fR \-> \fIFile/Find.pm\fR. .IP "\fBpath2dep\fR" 4 .IX Item "path2dep" Convert file path to conventional dependency name, e.g. \fIFile/Find.pm\fR \-> \fIperl(File/Find.pm)\fR. Note that this differs from RedHat conventional form \fIperl(File::Find)\fR. .IP "\fBmod2dep\fR" 4 .IX Item "mod2dep" Convert module name to conventional dependency name, e.g. \fIFile::Find\fR \-> \fIperl(File/Find.pm)\fR. Note that this differs from RedHat conventional form \fIperl(File::Find)\fR. .IP "\fBverf\fR" 4 .IX Item "verf" Format module version number, e.g. \fI2.12\fR \-> \fI2.120\fR. Currently truncated to 3 digits after decimal point, except for all zeroes, e.g. \&\fI2.000\fR \-> \fI2.0\fR. .Sp Update. The algorithm has been amended in almost compatible way so that versions do not lose precision when truncated. Now we allow one more \fI.ddd\fR series at the end, but \fI.000\fR is still truncated by default, e.g. \fI2.123\fR \-> \fI2.123\fR, \fI2.123456\fR \-> \fI2.123.456\fR. .IP "\fBverf_perl\fR" 4 .IX Item "verf_perl" Format Perl version number, e.g. \fI5.005_03\fR \-> \fI1:5.5.30\fR. .IP "\fBsv_version\fR" 4 .IX Item "sv_version" Extract version number from B::SV object. v\-strings converted to floats according to Perl rules, e.g. \fI1.2.3\fR \-> \fI1.002003\fR. .IP "\fBargv\fR" 4 .IX Item "argv" Obtain a list of files passed on the command line. When command line is empty, obtain a list of files from standard input, one file per line. Die when file list is empty. Check that each file exists, or die otherwise. Canonicalize each filename with \f(CW\*(C`File::Spec::rel2abs()\*(C'\fR function (which makes no checks against the filesystem). .IP "\fBinc\fR" 4 .IX Item "inc" Obtain a list of Perl library paths from \f(CW@INC\fR variable, except for current directory. The \s-1RPM_PERL_LIB_PATH\s0 environment variable, if set, is treated as a list of paths, seprarated by colons; put these paths in front of the list. Canonicalize each path in the list. .Sp Finally, the \s-1RPM_BUILD_ROOT\s0 environment variable, if set, is treated as installation root directory; each element of the list is then prefixed with canonicalized \s-1RPM_BUILD_ROOT\s0 path and new values are put in front of the list. .Sp After all, only existent directories are returned. .IP "\fBexplode\fR" 4 .IX Item "explode" Split given filename into its prefix (which is a valid Perl library path, according to the \fIinc()\fR function above) and basename. Return empty list if filename does not match any prefix. .SH "AUTHOR" .IX Header "AUTHOR" Written by Alexey Tourbin . .SH "COPYING" .IX Header "COPYING" Copyright (c) 2004 Alexey Tourbin, \s-1ALT\s0 Linux Team. .PP This is free software; you can redistribute it and/or modify it under the terms of the \s-1GNU\s0 Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. .SH "SEE ALSO" .IX Header "SEE ALSO" B::PerlReq, perl.req, perl.prov