Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: Storing multiple blocks of text in the __DATA__ section

by blindluke (Hermit)
on Jan 03, 2015 at 11:59 UTC ( [id://1112050]=note: print w/replies, xml ) Need Help??


in reply to Re: Storing multiple blocks of text in the __DATA__ section
in thread Storing multiple blocks of text in the __DATA__ section

I already use (and adore) Config::IniFiles, but it does not accept such simple syntax. It does, however accept multiline values for the params, but then the config would have to look like this:

[general] Room=<<EOT A simple multiline text description EOT Wall=<<EOT Another multiline wall description With two paragraphs. EOT

In recent versions of Config::IniFiles, you can specify a default section, so the first line of the above example could be omitted by doing:

$cfg = Config::IniFiles->new( -file => *DATA, -default => "general" );

Still, this is the same heredoc syntax which I was trying to avoid in the first place.

Fortunately, gnosti has found the Data::Section::Simple module that seems to do exactly what I was searching for. His recommendation, and your excellent first reply, add to the reasons why I love our Monastery. Thank you.

- Luke

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1112050]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-19 14:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found