11 Feb 2002 10:04:26 UTC
- Distribution: Win32-TieRegistry-PMVersionInfo
- Module version: 0.2
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (1)
- Testers (42 / 0 / 1)
- KwaliteeBus factor: 0
- 75.00% Coverage
- License: unknown
- Activity24 month
- Download (7.45KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version
- SEE ALSO
Win32::TieRegistry::PMVersionInfo - store in Win32 Registry PM $VERSION info
use Win32::TieRegistry::PMVersionInfo 0.2; my $reg = new Win32::TieRegistry::PMVersionInfo ( file_root => "D:/src/pl/spc2xml/version5/", ignore_dirs => ["Commercial/bin/", "Commercial/SPC/XSLT/SourceForge", "Commercial/SPC/XSLT/CSS", "Commercial/SPC/XSLT/imgs",], reg_root => 'LMachine/Software/LittleBits/', strip_path => $strip_path, chat=>1, ); $reg->get; $reg->store; exit;
This module mirrors to the Win32 registry version information from a perl module's heirachy.
It offers no support for reading the information - for that use the
Win32::TieRegistrymodule on which this module is based.
Version information is ascertained using the same method as in
ExtUtils::MakeMakerversion 5.45. To quote that module's manpage:
The first line in the file that contains the regular expression /([\$*])(([\w\:\']*)\bVERSION)\b.*\=/ will be evaluated with eval() and the value of the named variable after the eval() will be assigned to the VERSION attribute of the MakeMaker object. The following lines will be parsed o.k.: $VERSION = '1.00'; *VERSION = \'1.01'; ( $VERSION ) = '$Revision: 1.222 $ ' =~ /\$Revision:\s+([^\s]+)/; $FOO::VERSION = '1.10'; *FOO::VERSION = \'1.11'; our $VERSION = 1.2.3; # new for perl5.6.0 but these will fail: my $VERSION = '1.01'; local $VERSION = '1.02'; local $FOO::VERSION = '1.30'; (Putting "my" or "local" on the preceding line will work o.k.)
Expects a class name, and optionally a list of arguments in a hash-like structure, a hash or pointer to a hash. Options are keys in a the blessed hash reference that is the object, and as such may be directly accessed anytime.
The root at which to be begin parsing files.
An array of directories above the
file_rootnot to process. If any directory encountered matches at the beginning of one of these strings, it will not be processed.
The text to strip from left-hand side of paths when storing in the registry.
The branch at which to root the mirror of the directory structure.
A positve regular expressions used when reading a directory, which the module encloses within the bracket 'grouping' operator and anchors to the begining and end of the string being matched. The
..directories are excluded.
dirname_patternabove, but applies to filenames, and defaults to
Set to anything to retain the file extension when mapping to the registry (the default); expilcitly set to
undefto strip from the filename everything after the last full-stop.
Accepts an object reference, and optionally a directory to parse. Stores the names of all the files in the passed directory (or the calling object's
file_rootslot), and recurses (calls itself) on all sub-directories. Incidentally returns the path to the directory operated upon.
Will return without reiterating if the directory passed matches at the beginning of any string in the
ignore_dirslist (ie. the value in the object's
See "CONSTRUCTOR" for details of how to effect exclusion of file and directory names.
See also "DESCRIPTION" above for details of how the version is ascertained.
getmethod, but only gets information from files listed in a
MANIFESTfile, the path to which should be passed as the first argument.
Additionally, the name of a
MANIFEST.SKIPfile may be passed as a further argument, in which case no information will be garthered from files listed therein.
Accepts an object-reference and optionally a registry path to act as a root at which to secure the
$VERSIONinfo from every file in the object's
treeslot. If no 'root' is supplied, the calling object's
reg_rootslot is used. Incidentally returns the root used after making changes to the registry.
Be sure to pass all directories with a trailing '/'.
On Win32, it seems the
sub gethas problems with the
-doperator detecting whether a file is not a directory.
Windows registry, perl module, version information, versions, recursion .
Lee Goddard <firstname.lastname@example.org>
Copyright 2001, Lee Goddard. All rights reserved.
Available for public use under the same terms as Perl itself. This was developed as part of a private project, and is made available without promise of adding anything useful to it.
2 POD Errors
The following errors were encountered while parsing the POD:
- Around line 307:
Unknown directive: =over4
- Around line 309:
'=item' outside of any '=over'
Module Install Instructions
To install Win32::TieRegistry::PMVersionInfo, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Win32::TieRegistry::PMVersionInfo
For more information on module installation, please visit the detailed CPAN module installation guide.