Skip Menu |

This queue is for tickets about the App-Options CPAN distribution.

Report information
The Basics
Id: 53479
Status: new
Priority: 0/
Queue: App-Options

People
Owner: Nobody in particular
Requestors: m.nooning [...] comcast.net
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.07
Fixed in: (no value)



Subject: conf files not being found on windows xp
App::Options is not finding app.conf in the prog directory.  I have 32 bit Windows XP on two machines.  Perl on one is 5.8.9.  Perl on the other is 5.10.1.  The install of App::Options went smoothly.  All tests passed.

Directory of C:\ctemp
01/07/2010  10:17 AM                50 app.conf
01/07/2010  10:23 AM               802 appOptions01.pl

As you see from the paste below, the options from the app.conf file are not being printed out.
--------Paste of results
C:\ctemp>perl appOptions01.pl
Wow. Here are the options...
app                  => appOptions01
host                 => T43-2
hostname       => T43-2
prefix               => C:/Perl
Home is               C:\Documents and Settings\Malcolm
EXISTS : C:\ctemp\app.conf!!!


Subject: app.conf
Download app.conf
application/octet-stream 50b

Message body not shown because it is not plain text.

Subject: appOptions01.pl
use File::Spec; $ENV{HOME} = $ENV{"USERPROFILE"}; use App::Options; print "Wow. Here are the options...\n"; foreach (sort keys %App::options) { # options appear here! printf("%-20s => %s\n", $_, $App::options{$_}); } print ("Home is \t\t", $ENV{"USERPROFILE"}, "\n"); my $configFile = File::Spec->catfile("C:", "ctemp", "app.conf"); print "EXISTS : $configFile!!!\n" if (-e("$configFile")); __END__ >perl appOptions01.pl -s -r -yeah --awake=yes Wow. Here are the options... app => appOptions01 awake => yes host => Biostar01 hostname => Biostar01 prefix => C:/Perl r => 1 s => 1 yeah => 1 Home is C:\Documents and Settings\Malcolm
From: m.nooning [...] comcast.net
I will paste the contents of the .pl file, and the revised results, below.<br /> Same problem.&nbsp; The options in the config file are not showing up. <p>&lt;br&gt;&lt;br&gt;<br /> &nbsp;</p> use File::Spec;<br /> <br /> $ENV{HOME} = $ENV{&quot;USERPROFILE&quot;};<br /> use App::Options;<br /> &nbsp;&nbsp;&nbsp; print &quot;Wow. Here are the options...\n&quot;;<br /> &nbsp;&nbsp;&nbsp; foreach (sort keys %App::options) {&nbsp; # options appear here!<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printf(&quot;%-20s =&gt; %s\n&quot;, $_, $App::options{$_});<br /> &nbsp;&nbsp;&nbsp; }<br /> <br /> print (&quot;Home is \t\t&quot;, $ENV{&quot;USERPROFILE&quot;}, &quot;\n&quot;);<br /> <br /> my $configFile =&nbsp; File::Spec-&gt;catfile(&quot;C:&quot;, &quot;ctemp&quot;, &quot;app.conf&quot;);<br /> print &quot;EXISTS : $configFile!!!\n&quot; if (-e(&quot;$configFile&quot;));<br /> <br /> __END__<br /> <br /> C:\ctemp&gt;perl appOptions01.pl<br /> Wow. Here are the options...<br /> app&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; appOptions01<br /> host&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; T43-2<br /> hostname&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; T43-2<br /> prefix&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; C:/Perl<br /> Home is&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C:\Documents and Settings\Malcolm<br /> EXISTS : C:\ctemp\app.conf!!!<br /> <br />
From: m.nooning [...] comcast.net
<p>Now that paste did not turn out right, did it? Let me try that again<p> <code> use File::Spec; $ENV{HOME} = $ENV{"USERPROFILE"}; use App::Options; print "Wow. Here are the options...\n"; foreach (sort keys %App::options) { # options appear here! printf("%-20s => %s\n", $_, $App::options{$_}); } print ("Home is \t\t", $ENV{"USERPROFILE"}, "\n"); my $configFile = File::Spec->catfile("C:", "ctemp", "app.conf"); print "EXISTS : $configFile!!!\n" if (-e("$configFile")); __END__ C:\ctemp>cat app.conf [prog] purchase = yes hunt = definitely xxx = ttt C:\ctemp>perl appOptions01.pl Wow. Here are the options... app => appOptions01 host => T43-2 hostname => T43-2 prefix => C:/Perl Home is C:\Documents and Settings\Malcolm EXISTS : C:\ctemp\app.conf!!! </code>