cvsuser 05/05/14 07:14:01
Modified: App-Options Build.PL CHANGES META.yml README TODO
App-Options/benchmark run
App-Options/lib/App Options.pm
Log:
works with Win32 now
Revision Changes Path
1.3 +2 -1 p5ee/App-Options/Build.PL
Index: Build.PL
===================================================================
RCS file: /cvs/public/p5ee/App-Options/Build.PL,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Build.PL 31 Jan 2005 13:27:12 -0000 1.2
+++ Build.PL 14 May 2005 14:14:01 -0000 1.3
@@ -30,7 +30,7 @@
my $build = Module::Build->new (
dist_name => "App-Options",
dist_version_from => "lib/App/Options.pm",
- dist_author => "[EMAIL PROTECTED]",
+ dist_author => "[EMAIL PROTECTED]",
license => "perl",
requires => {
"Carp" => 0, # use croak() instead of die()
@@ -38,6 +38,7 @@
"Cwd" => 0, # use abs_path() to turn relative to
absolute directory
"File::Spec" => 0, # make directory handling work
cross-platform (i.e. MSWin)
"Config" => 0, # find prefix directory for the installation
of perl
+ "Module::Build" => 0, # needed for installing the software
},
@extra_args,
);
1.11 +14 -0 p5ee/App-Options/CHANGES
Index: CHANGES
===================================================================
RCS file: /cvs/public/p5ee/App-Options/CHANGES,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- CHANGES 30 Jan 2005 23:04:59 -0000 1.10
+++ CHANGES 14 May 2005 14:14:01 -0000 1.11
@@ -2,6 +2,20 @@
# CHANGE LOG
#############################################################################
+VERSION 0.96
+ x cleaned up some of the --debug_options output
+ x used File::Spec to make file/directory manipulation platform-independent
(i.e. Win32)
+ NOTE: I used a mix of platform-independent File::Spec functions and
explicit
+ conversion from "\" paths to POSIX-compliant "/" paths. This is because
the
+ purist form of leaving "\" paths for Win32 was causing weirdness. When
+ I would interpolated the string or use it in a regular expression, the
+ backslashes were interacting badly. The only reason I'm not going to 1.0
+ with this is that I want to see it pass Win32 tests on the CPAN testers
+ farm before giving it that number.
+
+VERSION 0.95
+ x made a change (hack) to Build.PL to get it to work with the CPAN shell
+
VERSION 0.94
x use Module::Build instead of ExtUtils::MakeMaker
x add a META.yaml file to the distribution (from "Build distmeta")
1.3 +5 -5 p5ee/App-Options/META.yml
Index: META.yml
===================================================================
RCS file: /cvs/public/p5ee/App-Options/META.yml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- META.yml 30 Jan 2005 23:06:19 -0000 1.2
+++ META.yml 14 May 2005 14:14:01 -0000 1.3
@@ -1,19 +1,19 @@
---- #YAML:1.0
+---
name: App-Options
-version: 0.94
+version: 0.95
author:
- stephen.adkins.com
-abstract: |-
- combine command line options, environment vars, and option file values
+abstract: combine command line options, environment vars, and option file
values
license: perl
requires:
Carp: 0
Config: 0
Cwd: 0
File::Spec: 0
+ Module::Build: 0
Sys::Hostname: 0
provides:
App::Options:
file: lib/App/Options.pm
- version: 0.94
+ version: 0.95
generated_by: Module::Build version 0.2608
1.4 +3 -3 p5ee/App-Options/README
Index: README
===================================================================
RCS file: /cvs/public/p5ee/App-Options/README,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- README 2 Sep 2004 21:09:00 -0000 1.3
+++ README 14 May 2005 14:14:01 -0000 1.4
@@ -42,8 +42,8 @@
the "whatever = value" statement. Initialization searches
"$HOME/.app/$prog.conf", "$HOME/.app/app.conf",
"$progdir/$prog.conf", "$progdir/app.conf",
- "$prefix/$prog.conf", "$prefix/app.conf", and "/etc/app.conf"
- in order to find the option values.
+ "$prefix/etc/app/$prog.conf", "$prefix/etc/app/app.conf", and
+ "/etc/app.conf" in order to find the option values.
o Import other files with "import = filename" statement
Config files can, in essence, include other config files.
o Stop importing other files with "flush_imports = 1" statement
1.10 +6 -2 p5ee/App-Options/TODO
Index: TODO
===================================================================
RCS file: /cvs/public/p5ee/App-Options/TODO,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- TODO 30 Jan 2005 23:04:59 -0000 1.9
+++ TODO 14 May 2005 14:14:01 -0000 1.10
@@ -3,9 +3,12 @@
######################################################################
These items are what will be required to go to version 1.00.
- o use File::Spec to make file/directory manipulation platform-independent
+ o [no more critical items]
These are other interesting things which I might do
+ o clean up use of --version_modules (when to show all)
+ o incorporate LWP::UserAgent->get() as a standard way to get a conf
+ o VERSION option in program sets the $main::VERSION
o investigate why $PREFIX/lib gets added to @INC twice
o "strict" option:
0 = no strictness
@@ -22,6 +25,7 @@
o make lots more tests (starting with the examples in the documentation)
o make example scripts (starting with the examples in the documentation)
o enforce other option parsing rules (single letter + arg, single/double
dash)
+ o consider ISO std datetimes: T instead of space, Z suffix, timezone suffix
o option aliases/synonyms/alternates (i.e. -s = --silent)
o "secure" attribute (to ensure that passwords are only stored in files not
readable by "world", and never in %ENV)
1.2 +15 -0 p5ee/App-Options/benchmark/run
Index: run
===================================================================
RCS file: /cvs/public/p5ee/App-Options/benchmark/run,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- run 2 Dec 2004 21:50:17 -0000 1.1
+++ run 14 May 2005 14:14:01 -0000 1.2
@@ -20,9 +20,24 @@
App::Options->init(values => \%values);
}
+sub baseline2 {
+ my (%values);
+ App::Options->init(values => \%values);
+ App::Options->init(values => \%values);
+}
+
+sub baseline3 {
+ my (%values);
+ App::Options->init(values => \%values);
+ %values = ();
+ App::Options->init(values => \%values);
+}
+
$count = 400;
cmpthese($count, {
'baseline' => \&baseline,
+ 'baseline2' => \&baseline2,
+ 'baseline3' => \&baseline3,
});
1.16 +8 -5 p5ee/App-Options/lib/App/Options.pm
Index: Options.pm
===================================================================
RCS file: /cvs/public/p5ee/App-Options/lib/App/Options.pm,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- Options.pm 14 May 2005 14:04:21 -0000 1.15
+++ Options.pm 14 May 2005 14:14:01 -0000 1.16
@@ -14,7 +14,7 @@
use File::Spec;
use Config;
-$VERSION = "0.94";
+$VERSION = "0.96";
=head1 NAME
@@ -549,9 +549,9 @@
}
}
$exclude_section = 0;
- print STDERR " Looking for Option File [$option_file]\n" if
($debug_options >= 2);
+ print STDERR " Looking for Option File [$option_file]" if
($debug_options);
if (open(App::Options::FILE, "< $option_file")) {
- print STDERR " Found Option File [$option_file]\n" if
($debug_options >= 2);
+ print STDERR " : Found\n" if ($debug_options);
while (<App::Options::FILE>) {
chomp;
print STDERR " [$exclude_section] $_\n" if
($debug_options >= 5);
@@ -662,6 +662,9 @@
delete $values->{import};
}
}
+ else {
+ print STDERR "\n" if ($debug_options);
+ }
}
$debug_options = $values->{debug_options} || 0;
}