What module did you use for reading/parsing your INI file? Config::Tiny? Config::Simple? Config::INI? Something else? Or did you roll your own?

For example, Config::Tiny handles spaces around the equals just fine:

#!/usr/bin/perl -l use warnings; use strict; use Config::Tiny; my $ini_string = <<"EOINI"; a=nospace b = space [GROUP1] c=nospace d = space EOINI my $cfg = Config::Tiny->read_string($ini_string); use Data::Dumper; $Data::Dumper::Indent = 0; print Dumper $cfg; __END__ __OUTPUT__ $VAR1 = bless( {'_' => {'a' => 'nospace','b' => 'space'},'GROUP1' => { +'d' => 'space','c' => 'nospace'}}, 'Config::Tiny' );

I don't have the other two installed, but Config::INI claims to handle spaces around the equals, and Config::Simple's claim of "whitespace support" implies to me that it might


In reply to Re^5: Reading host from defaults file with DBD::mysql by pryrt
in thread Reading host from defaults file with DBD::mysql by Llew_Llaw_Gyffes

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.