gregor-e has asked for the wisdom of the Perl Monks concerning the following question:

I'm having a problem using Config::Properties. It appears to be eating some characters of DOS paths. Here is a test program:

#!/usr/bin/perl

use Config::Properties;
use FindBin;
use Data::Dumper;

my $location = $FindBin::Bin;
my $PROPHANDLE;
open ($PROPHANDLE, "<$location/proptest.conf") || die
    "Cannot open config file: proptest.conf";

my $properties = new Config::Properties();
$properties->load( $PROPHANDLE );

print Dumper($properties);

Here is the properties file it reads:

first_property = ALPHA is the first property
local_dir = C:\\Temp\\test
far_dir = D:\\inetpub\\wwwroot\\test
home_dir = C:\\cygwin\\home\\gbloom
last_property = OMEGA is the last property

And here is the output. Notice the munging that is occurring to the DOS paths:

$VAR1 = bless( {
                 'format' => '%s=%s',
                 'defaults' => undef,
                 'properties' => {
                                   'far_dir' => 'D:\\etpub\\\\wwwroot\\\\test',
                                   'local_dir' => 'C:\\emp\\\\test',
                                   'first_property' => 'ALPHA is the first property',
                                   'home_dir' => 'C:\\gwin\\\\home\\\\gbloom',
                                   'last_property' => 'OMEGA is the last property'
                                 },
                 'PERL_MODE' => 0
               }, 'Config::Properties' );

Is this a bug, or do I just not understand the format of property files?

I'm running:

This is perl, v5.6.1 built for MSWin32-x86-multi-thread
(with 1 registered patch, see perl -V for more detail)

Copyright 1987-2001, Larry Wall

Binary build 633 provided by ActiveState Corp. http://www.ActiveState.com
Built 21:33:05 Jun 17 2002

ppm> query Config-Properties
Querying target 1 (ActivePerl 5.6.1.633)
  1. Config-Properties 0.40 read Java-style properties files

Thanks