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

I can test this on my OpenBSD box if you provide some more information.
  1. Perl version
  2. Config::Std version
  3. Bare minimal runnable example that displays this problem. I can't run the example you provided.
Also, please read the following:
How (not) to ask a question - Only Post Relevant Code
  • Comment on Re: problem with Config::Std on FreeBSD box?

Replies are listed 'Best First'.
Re^2: problem with Config::Std on FreeBSD box?
by leocharre (Priest) on Aug 25, 2006 at 20:53 UTC

    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..

      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... ?

      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.
      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