in reply to Error with IniFile and Config::Ini

I'd recommend you go to the appropriate CPAN page (sorry, having trouble inserting a link, try http://search.cpan.org/doc/AVATAR/Config-Ini-1.08/Ini.pm ), print out the documentation on Config::Ini and read it. Then try a few examples, using a real script and not a one-liner.

If a couple of the simple functions fail, then there may well be something wrong with your installation.

I'm not perfect either -- I have resisted using the debugger, not because I'm lazy but because I'm a little reluctant to learn yet another debugger's cryptic commands. I took the plunge recently and while I am a little klutzy right now (you should have seen me the first year I used vi) I got the job done. <aside> Use the debugger religiously and "the truth shall set you free" -- paraphrasing, the debugger tells the truth to any whose ears are open. If you can't be bothered to use the debugger, it will most likely take you much longer to solve your problem.</aside>

--t. alex

"Of course, you realize that this means war." -- Bugs Bunny.

ps When you ask a question on CB (like you did around 11am ET Saturday), it's considered a courtesy to stick around for an answer. :)

Replies are listed 'Best First'.
Re: Re: Error with IniFile and Config::Ini
by Flame (Deacon) on Jan 13, 2002 at 02:34 UTC
    I don't think the debugger could really have helped me here... I found the source of the error message (No such file or directory)... Theres a file test (-e) used in the open method in both of the modules. However, it doesn't explain those warnings from Tie:IxHash or the fact that $ini->put() returns false... Is there something wrong with Tie::IxHash's way of doing splice?

    Sample from the open sub:
    sub open { my ($self, $file, %args) = @_; if (defined $file) { $self->{file} = $file; } else { $file = $self->{file}; } # No need to do anything if this is a new file. return 1 unless(-e $file)



    -----BEGIN GEEK CODE BLOCK-----
    Version: 3.12
    GIT d- s:++ a--- C++++ UL P+++>++++ L+ E- W++>+++ N !o K- w+ O---- M-- V--
    PS PE Y- PGP t++(+++) 5(+++)++++ X R+@ tv+ b+++ DI+ D- G e->+++ h! r-- y-
    ------END GEEK CODE BLOCK------
    Translate

    "Weird things happen, get used to it."

    Flame ~ Lead Programmer: GMS