in reply to Re: problem with Config::Std on FreeBSD box?
in thread problem with Config::Std on FreeBSD box?

In example.conf:

# example.conf must sit beside this script # it contains : [settings] a : house b : room

In example.cgi:

#!/usr/bin/perl -w use strict; use Config::Std; read_config( 'example.conf' => my %conf ); print STDERR "example.conf: ".$conf{settings}{a}."\n";

Both files must reside in same directory.

Box 1, error
Config::Std version 0.0.4
perl v5.6.1 built for i386-linux
freebsd box
Outputs:

Malformed prototype for Config::Std::Hash::read_config: $\%$ at example.cgi line 5.

Box 2, works
Config::Std version 0.0.4
perl v5.8.3 built for i586-linux-thread-multi
suse box

Box 3, works
Config::Std version 0.0.4
perl v5.8.6 built for 86_64-linux-thread-multi
FC box

Sorry for the sloppy post..

Replies are listed 'Best First'.
Re^3: problem with Config::Std on FreeBSD box?
by imp (Priest) on Aug 25, 2006 at 21:38 UTC
    Found the problem.

    The prototype being used by Config::Std::read_config isn't supported until perl 5.7.3 - see perl573delta.

    Minimal test case:

    sub read_config ($\[%$]) {} read_config( 'example.conf' => my %conf );

      Thank you so much.. I'm on that.

      It's really a simple thing it's doing for the end user of this module.. But it seems clean and slick - And it's made by the Big Poppa of sterilized coding... So I didn't want to pass this up. Should there be something in Config::Std About this? Makefile.PL does not say something about the version of perl needed. Did I miss it? Did the person who installed this miss it... ?

Re^3: problem with Config::Std on FreeBSD box?
by imp (Priest) on Aug 25, 2006 at 21:15 UTC
    Works for me in this environment:
    Config::Std version 0.0.4
    perl 5.8.2 built for i386-openbsd 
    OpenBSD 3.5
    
    Installing perl 5.6.2, will update this entry once its done and I can test.
Re^3: problem with Config::Std on FreeBSD box?
by perlfan (Parson) on Aug 25, 2006 at 21:29 UTC
    Why on Earth is your FreeBSD Perl build for i386-linux?

    What version of Perl are you really using on FreeBSD? And what version of FreeBSD is this?
      [xxxxx@xxxxx xxxxx]$ perl -v This is perl, v5.6.1 built for i386-linux

      My access to the system is limited. Frustrating..

      [xxxxx@xxxxx xxxxx]$ uname -a Linux xxxxx.xxxxx.net 2.6.7 #6 Sat Aug 14 16:53:57 UTC 2004 i686 unkno +wn