Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: To Extend, to Use, to Create

by perlfan (Vicar)
on Dec 07, 2020 at 20:03 UTC ( #11124797=note: print w/replies, xml ) Need Help??


in reply to To Extend, to Use, to Create

You don't need to use blocks with Config::Tiny, it hides "global" variables under the _ key:
;;config var1=foo var2=bar

readconfig.pl:

use Config::Tiny; my $conf = Config::Tiny->read('test.ini'); require Data::Dumper; print Data::Dumper::Dumper($conf);

dump:

$VAR1 = bless( { '_' => { 'var1' => 'foo', 'var2' => 'bar' } }, 'Config::Tiny' );

Replies are listed 'Best First'.
Re^2: To Extend, to Use, to Create
by Bod (Chaplain) on Dec 07, 2020 at 20:59 UTC

    I did look at Config::Tiny but I cannot see now why I rejected it...

    I have written a module which does what I need to do and I'm currently trying to get my head around POD and test files - neither of which I have used before.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2021-04-21 00:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?