r20480 - in /trunk/libgetopt-argvfile-perl: ArgvFile.pm Changes MANIFEST META.yml Makefile.PL README debian/changelog demos/ t/.resolvepathes.t t/pod-coverage.t t/pod.t t/resolvepathes.t
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Wed May 28 15:44:26 UTC 2008
Author: gregoa
Date: Wed May 28 15:44:26 2008
New Revision: 20480
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=20480
Log:
New upstream release.
Added:
trunk/libgetopt-argvfile-perl/Changes
- copied unchanged from r20479, branches/upstream/libgetopt-argvfile-perl/current/Changes
trunk/libgetopt-argvfile-perl/META.yml
- copied unchanged from r20479, branches/upstream/libgetopt-argvfile-perl/current/META.yml
trunk/libgetopt-argvfile-perl/demos/
- copied from r20479, branches/upstream/libgetopt-argvfile-perl/current/demos/
trunk/libgetopt-argvfile-perl/t/pod-coverage.t
- copied unchanged from r20479, branches/upstream/libgetopt-argvfile-perl/current/t/pod-coverage.t
trunk/libgetopt-argvfile-perl/t/pod.t
- copied unchanged from r20479, branches/upstream/libgetopt-argvfile-perl/current/t/pod.t
Modified:
trunk/libgetopt-argvfile-perl/ArgvFile.pm
trunk/libgetopt-argvfile-perl/MANIFEST
trunk/libgetopt-argvfile-perl/Makefile.PL
trunk/libgetopt-argvfile-perl/README
trunk/libgetopt-argvfile-perl/debian/changelog
trunk/libgetopt-argvfile-perl/t/.resolvepathes.t
trunk/libgetopt-argvfile-perl/t/resolvepathes.t
Modified: trunk/libgetopt-argvfile-perl/ArgvFile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgetopt-argvfile-perl/ArgvFile.pm?rev=20480&op=diff
==============================================================================
--- trunk/libgetopt-argvfile-perl/ArgvFile.pm (original)
+++ trunk/libgetopt-argvfile-perl/ArgvFile.pm Wed May 28 15:44:26 2008
@@ -4,6 +4,15 @@
# ---------------------------------------------------------------------------------------
# version | date | author | changes
# ---------------------------------------------------------------------------------------
+# 1.11 |17.04.07| JSTENZEL | renamed fileOptions2prefixes() into _fileOptions2prefixes(),
+# | | | in order to avoid POD documentation because it is an
+# | | | internal helper function;
+# | | JSTENZEL | slight adaptations after complaints of perlcritic;
+# | | JSTENZEL | added POD hints that GetOptions() is imported from
+# | | | Getopt::Long and not defined in Getopt::ArgvFile;
+# | | JSTENZEL | POD: bugfix in GetOptions() calls, %options hash needs to
+# | | | be passed in as reference;
+# |21.04.07| JSTENZEL | POD: bugfix in -fileOption example;
# 1.10 |05.01.05| JSTENZEL | added options resolveRelativePathes and resolveEnvVars;
# 1.09 |19.10.04| JSTENZEL | option -startupFilename now accepts array references both
# | | | directly set up and supplied by a callback;
@@ -42,7 +51,7 @@
=head1 VERSION
-This manual describes version B<1.10>.
+This manual describes version B<1.11>.
=head1 SYNOPSIS
@@ -56,7 +65,7 @@
...
# evaluate options, e.g. this common way:
- GetOptions(%options, 'any');
+ GetOptions(\%options, 'any'); # this function is defined in Getopt::Long
Or suppress option hint processing when the module is loaded, to
perform it later on:
@@ -72,7 +81,7 @@
Getopt::ArgvFile::argvFile(default=>1);
# evaluate options, e.g. this common way:
- GetOptions(%options, 'any');
+ GetOptions(\%options, 'any'); # this function is defined in Getopt::Long
Or use the traditional two step invocation of module loading with
I<symbol import> and I<explicit> option file handling:
@@ -90,7 +99,7 @@
argvFile(default=>1);
# evaluate options, e.g. this common way:
- GetOptions(%options, 'any');
+ GetOptions(\%options, 'any'); # this function is defined in Getopt::Long
If options should be processed into another array, this can be done this way:
@@ -112,7 +121,7 @@
...
# replace file hints by the options stored in the files
- argvFile(fileOption=>'option', array=>\@options);
+ argvFile(fileOption=>'options', array=>\@options);
=head1 DESCRIPTION
@@ -208,15 +217,15 @@
# PACKAGE SECTION ###############################################
+# declare namespace
+package Getopt::ArgvFile;
+
+# declare your revision (and use it to avoid a warning)
+$VERSION=1.11;
+$VERSION=$VERSION;
+
# force Perl version
require 5.003;
-
-# declare namespace
-package Getopt::ArgvFile;
-
-# declare your revision (and use it to avoid a warning)
-$VERSION="1.10";
-$VERSION=$VERSION;
=pod
@@ -423,7 +432,7 @@
A path is resolved I<relative to the option file> it is found in.
-B<Envrionment variables>
+B<Environment variables>
Similar to relative pathes, environment variables are handled differently
depending if the option is specified at the commandline or from an option
@@ -546,7 +555,7 @@
B<Processing an alternative array>
-However the function was designed to process @ARGV, it is possible to
+Although the function was designed to process @ARGV, it is possible to
process another array as well if you prefer. To do this, simply pass
a I<reference> to this array by parameter B<array>.
@@ -613,7 +622,7 @@
my $casesensitiveFilenames=$^O!~/^(?:dos|os2|MSWin32)/i;
# check and get parameters
- confess("[BUG] Getopt::ArgvFile::argvFile() uses named parameters, please provide name value pairs.") if @_ % 2;
+ confess('[BUG] Getopt::ArgvFile::argvFile() uses named parameters, please provide name value pairs.') if @_ % 2;
my %switches=@_;
# perform more parameter checks
@@ -658,7 +667,7 @@
unless ref($startupFilenames);
# substitute file options by prefixes, if necessary
- fileOptions2prefixes($fileOption, $prefix, $arrayRef) if $fileOption;
+ _fileOptions2prefixes($fileOption, $prefix, $arrayRef) if $fileOption;
# init startup file paths
(
@@ -775,7 +784,7 @@
# as they would get lost otherwise (other backslash removals are welcome!)
s/\\\$/\\\\\$/g;
my (@shellwords)=shellwords($_);
-
+
# replace environment variables, if necessary
if (exists $switches{resolveEnvVars})
{
@@ -827,7 +836,7 @@
}
# substitute file options by prefixes, if necessary
- fileOptions2prefixes($fileOption, $prefix, \@c) if $fileOption;
+ _fileOptions2prefixes($fileOption, $prefix, \@c) if $fileOption;
# replace original array by expanded array
@$arrayRef=@c;
@@ -859,7 +868,7 @@
# preprocess an array to convert the -fileOption string into a prefix
-sub fileOptions2prefixes
+sub _fileOptions2prefixes
{
# get and check parameters
my ($fileOption, $prefix, $arrayRef)=@_;
@@ -873,7 +882,7 @@
$options=~s/($optionPrefixPattern$fileOption\x01+)/$prefix/g;
# replace original array
- @$arrayRef=split("\x01\x01\x01", $options);;
+ @$arrayRef=split(/\x01\x01\x01/, $options);;
}
}
@@ -944,7 +953,7 @@
=head1 LICENSE
-Copyright (c) 1993-2005 Jochen Stenzel. All rights reserved.
+Copyright (c) 1993-2007 Jochen Stenzel. All rights reserved.
This program is free software, you can redistribute it and/or modify it
under the terms of the Artistic License distributed with Perl version
Modified: trunk/libgetopt-argvfile-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgetopt-argvfile-perl/MANIFEST?rev=20480&op=diff
==============================================================================
--- trunk/libgetopt-argvfile-perl/MANIFEST (original)
+++ trunk/libgetopt-argvfile-perl/MANIFEST Wed May 28 15:44:26 2008
@@ -1,7 +1,12 @@
ArgvFile.pm
+Changes
MANIFEST
+META.yml
Makefile.PL
README
+demos/defaultOptionFiles.pl
+demos/defaultUse.pl
+demos/delayedProcessing.pl
t/.base.t
t/.base.t.cfg
t/.expandenv.t
@@ -14,7 +19,9 @@
t/expandenv.t
t/fileopt.t
t/noHOMEvar.t
+t/pod-coverage.t
+t/pod.t
t/prefix.t
t/resolvepathes.t
t/use1.t
-t/use2.t
+t/use2.t
Modified: trunk/libgetopt-argvfile-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgetopt-argvfile-perl/Makefile.PL?rev=20480&op=diff
==============================================================================
--- trunk/libgetopt-argvfile-perl/Makefile.PL (original)
+++ trunk/libgetopt-argvfile-perl/Makefile.PL Wed May 28 15:44:26 2008
@@ -11,13 +11,15 @@
WriteMakefile(
NAME => 'Getopt::ArgvFile',
VERSION_FROM => 'ArgvFile.pm',
- PREREQ_PM => {
- Text::ParseWords => 3.1,
- Test::Harness => 1.25,
- Test::More => 0.11,
- },
+ LICENSE => 'artistic',
+
+ PREREQ_PM => {
+ Text::ParseWords => 3.1,
+ Test::Harness => 1.25,
+ Test::More => 0.11,
+ },
dist => {
COMPRESS => 'gzip -9',
- SUFFIX => 'tgz',
+ SUFFIX => 'tar.gz',
},
);
Modified: trunk/libgetopt-argvfile-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgetopt-argvfile-perl/README?rev=20480&op=diff
==============================================================================
--- trunk/libgetopt-argvfile-perl/README (original)
+++ trunk/libgetopt-argvfile-perl/README Wed May 28 15:44:26 2008
@@ -2,7 +2,7 @@
Release
=======
-Getopt::ArgvFile 1.10.
+Getopt::ArgvFile 1.11.
Overview
@@ -135,163 +135,7 @@
What's new?
===========
-1.10 New options "resolveRelativePathes" and "resolveEnvVars"
- make it behave like the shell in resolving relative
- pathes (relative to the option file they are used in)
- and environment variables.
-
-1.09 This version integrates several improvements suggested
- by Kathryn Andersen, provided as complete patches that
- were carefully prepared. Thanks!
-
- First, option "startupFilename" accepts *lists* now,
- both directly provided and supplied by a callback.
- For each startup directory, the list is searched for
- the name of an existing file. The first matching file
- gets processed.
-
- Example:
-
- use Getopt::ArgvFile startupFilenames=>[qw(.rc .cfg)];
-
- searches for startup files named ".rc" and ".cfg"
- (in this order), using the first file available
- in each startup path.
-
- Second, a new option "fileOption" allows to declare
- an option usable instead of an option file *prefix*,
- intended to make option files more familiar to new
- users.
-
- Example:
-
- use Getopt::ArgvFile fileOption=>'options';
-
- allows to specify an option file by
-
- ... -options file ...
-
- , which is a synonym for (the still valid)
-
- ... @file
-
- Nesting and cascading still work as before.
-
- Example:
-
- ... -options -options file
-
- is a synonym for (the still valid)
-
- ... @@file
-
- syntax.
-
- Besides these patches, Test::More::eq_array() turned
- out to be buggy (in older versions of Test::More, at
- least), so tests now use the well working
- Test::More::is_deeply() function.
-
- Finally, the results of "startupFilename" callbacks
- were not checked yet. This is fixed.
-
-1.08 In very rare circumstances, the one line processing
- via use() that was introduced with 1.07 could break
- older scripts written for 1.06 or before. These were
- the conditions:
-
- * The module was loaded by "use Getopt::ArgvFile",
- without import hints.
-
- * Therefore, &argvFile was not imported into the
- loaders namespace, so it had to be called via full
- name as "Getopt::ArgvFile::argvFile(...)".
-
- * The loader made use of cascading (was aware of
- multiple prefixes like in "@@optionfile", of which
- only the first level should be processed by the
- call of argvFile() and remaining hints should be
- passed through to another script).
-
- In such cases, option hints were processed *twice*
- unintentionally with 1.07, cause both "use" and the
- explicit call of argvFile() invoked this processing,
- which caused *two* level hints to be resolved instead
- of one.
-
- To adapt such scripts, 1.08 introduces a "justload"
- switch for "use":
-
- use Getopt::ArgvFile justload=>1;
-
- This loads the module, but suppresses further operations.
-
- Alternatively, one could remove the explicit call
- of Getopt::ArgvFile::argvFile() from affected scripts.
-
- -
-
- More tests added.
-
-1.07 Bugfix: a missing HOME environment variable was not
- handled correctly in all cases, causing error messages.
- Thanks to Matthew Brett for the bug report.
-
- -
-
- It is now possible to process option files while
- the module is loaded.
-
- Before, a typical use looked like this:
-
- use Getopt::ArgvFile qw(argvFile);
- ...
- argvFile(default=>1);
-
- While this is still possible and valid, it can be
- reduced to one line now:
-
- use Getopt::ArgvFile default=>1;
-
- Just pass the parameters of argvFile() to use().
- Thanks to johanl AT darsermann.com for the
- suggestion.
-
-
-1.06 argvFile() takes a new option "startupFilename"
- to let users specify what scheme should be used
- to find startup files (thanks to Helmut Steinbach
- for the initial idea). Names may be specified
- directly or by a reference to a function which
- will then be invoked with the scriptname to
- provide the filename dynamically.
-
-1.05 Using File::Spec::Functions to build filenames
- more portable.
-
- Using Cwd::abs_path() now to check if several
- startup file locations are identical.
-
- Added support for startup files in the *current*
- directory (thanks to Helmut Steinbach for this
- suggestion).
-
- Switched to Test::More (for installation checks).
-
-1.04 fixed a bug: if the script directory was identical
- to the users home and both default and home setting
- were used, the default options were read twice
- (thanks to Manfred Kuegler for the report).
-
-1.03 introduced new parameter "prefix".
- POD comments in option files are supported now
- (according to an idea of Joe Pepin).
-
-1.02 introduced new parameter "array".
-
-1.01 came with an updated README to reflect that the
- required module Text::ParseWords 3.1 is available
- on CPAN now.
+Please see the changelog ("Changes") for a distribution history.
Problems?
@@ -304,7 +148,7 @@
Author, Copyright, License
==========================
-Copyright (c) 1993-2005 Jochen Stenzel. All rights reserved.
+Copyright (c) 1993-2007 Jochen Stenzel. All rights reserved.
This module is free software, you can redistribute it and/or modify it
under the terms of the Artistic License distributed with Perl version
Modified: trunk/libgetopt-argvfile-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgetopt-argvfile-perl/debian/changelog?rev=20480&op=diff
==============================================================================
--- trunk/libgetopt-argvfile-perl/debian/changelog (original)
+++ trunk/libgetopt-argvfile-perl/debian/changelog Wed May 28 15:44:26 2008
@@ -1,4 +1,4 @@
-libgetopt-argvfile-perl (1.10-4) UNRELEASED; urgency=low
+libgetopt-argvfile-perl (1.11-1) UNRELEASED; urgency=low
* debian/control: Added: Vcs-Svn field (source stanza); Vcs-Browser
field (source stanza); Homepage field (source stanza). Removed: XS-
@@ -7,6 +7,8 @@
* Split out changes to test script into t_resolvepath.patch; add quilt
framework.
* debian/watch: use dist-based URL.
+
+ * New upstream release.
-- gregor herrmann <gregor+debian at comodo.priv.at> Tue, 09 Oct 2007 22:29:37 +0200
Modified: trunk/libgetopt-argvfile-perl/t/.resolvepathes.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgetopt-argvfile-perl/t/.resolvepathes.t?rev=20480&op=diff
==============================================================================
--- trunk/libgetopt-argvfile-perl/t/.resolvepathes.t (original)
+++ trunk/libgetopt-argvfile-perl/t/.resolvepathes.t Wed May 28 15:44:26 2008
@@ -13,7 +13,7 @@
# back to first file (relative to *this* file!!)
-file1
-.././../././Getopt-ArgvFile-1.10/t/file1
+../././t/file1
# now, for a nested option file (relative to *this* file!!)
@././././.resolvepathes2.t
Modified: trunk/libgetopt-argvfile-perl/t/resolvepathes.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libgetopt-argvfile-perl/t/resolvepathes.t?rev=20480&op=diff
==============================================================================
--- trunk/libgetopt-argvfile-perl/t/resolvepathes.t (original)
+++ trunk/libgetopt-argvfile-perl/t/resolvepathes.t Wed May 28 15:44:26 2008
@@ -27,7 +27,7 @@
'./../file2',
'-file1',
- ".././../././Getopt-ArgvFile-$Getopt::ArgvFile::VERSION/t/file1",
+ "../././t/file1",
);
# perform first check
More information about the Pkg-perl-cvs-commits
mailing list