Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

perlreq::utils(3pm) [debian man page]

PerlReq::Utils(3pm)					User Contributed Perl Documentation				       PerlReq::Utils(3pm)

NAME
PerlReq::Utils - auxiliary routines for B::PerlReq, perl.req and perl.prov DESCRIPTION
This module provides the following convenience functions: path2mod Convert file path to module name, e.g. File/Find.pm -> File::Find. mod2path Convert module name to file path, e.g. File::Find -> File/Find.pm. path2dep Convert file path to conventional dependency name, e.g. File/Find.pm -> perl(File/Find.pm). Note that this differs from RedHat conventional form perl(File::Find). mod2dep Convert module name to conventional dependency name, e.g. File::Find -> perl(File/Find.pm). Note that this differs from RedHat conventional form perl(File::Find). verf Format module version number, e.g. 2.12 -> 2.120. Currently truncated to 3 digits after decimal point, except for all zeroes, e.g. 2.000 -> 2.0. Update. The algorithm has been amended in almost compatible way so that versions do not lose precision when truncated. Now we allow one more .ddd series at the end, but .000 is still truncated by default, e.g. 2.123 -> 2.123, 2.123456 -> 2.123.456. verf_perl Format Perl version number, e.g. 5.005_03 -> 1:5.5.30. sv_version Extract version number from B::SV object. v-strings converted to floats according to Perl rules, e.g. 1.2.3 -> 1.002003. 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 "File::Spec::rel2abs()" function (which makes no checks against the filesystem). inc Obtain a list of Perl library paths from @INC variable, except for current directory. The RPM_PERL_LIB_PATH 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. Finally, the RPM_BUILD_ROOT environment variable, if set, is treated as installation root directory; each element of the list is then prefixed with canonicalized RPM_BUILD_ROOT path and new values are put in front of the list. After all, only existent directories are returned. explode Split given filename into its prefix (which is a valid Perl library path, according to the inc() function above) and basename. Return empty list if filename does not match any prefix. AUTHOR
Written by Alexey Tourbin <at@altlinux.org>. COPYING
Copyright (c) 2004 Alexey Tourbin, ALT Linux Team. This is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. SEE ALSO
B::PerlReq, perl.req, perl.prov perl v5.14.2 2011-11-05 PerlReq::Utils(3pm)

Check Out this Related Man Page

File::Find::Rule::Extending(3)				User Contributed Perl Documentation			    File::Find::Rule::Extending(3)

NAME
File::Find::Rule::Extending - the mini-guide to extending File::Find::Rule SYNOPSIS
package File::Find::Rule::Random; use strict; # take useful things from File::Find::Rule use base 'File::Find::Rule'; # and force our crack into the main namespace sub File::Find::Rule::random () { my $self = shift()->_force_object; $self->exec( sub { rand > 0.5 } ); } 1; DESCRIPTION
File::Find::Rule went down so well with the buying public that everyone wanted to add extra features. With the 0.07 release this became a possibility, using the following conventions. Declare your package package File::Find::Rule::Random; use strict; Inherit methods from File::Find::Rule # take useful things from File::Find::Rule use base 'File::Find::Rule'; Force your madness into the main package # and force our crack into the main namespace sub File::Find::Rule::random () { my $self = shift()->_force_object; $self->exec( sub { rand > 0.5 } ); } Yes, we're being very cavalier here and defining things into the main File::Find::Rule namespace. This is due to lack of imaginiation on my part - I simply can't find a way for the functional and oo interface to work without doing this or some kind of inheritance, and inheritance stops you using two File::Find::Rule::Foo modules together. For this reason try and pick distinct names for your extensions. If this becomes a problem then I may institute a semi-official registry of taken names. Taking no arguments. Note the null prototype on random. This is a cheat for the procedural interface to know that your sub takes no arguments, and so allows this to happen: find( random => in => '.' ); If you hadn't declared "random" with a null prototype it would have consumed "in" as a parameter to it, then got all confused as it doesn't know about a '.' rule. AUTHOR
Richard Clamp <richardc@unixbeard.net> COPYRIGHT
Copyright (C) 2002 Richard Clamp. All Rights Reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
File::Find::Rule File::Find::Rule::MMagic was the first extension module, so maybe check that out. perl v5.16.2 2011-09-19 File::Find::Rule::Extending(3)
Man Page