Hi I'm trying to use Perl as a configuration language. I have found
Data::Dumper. I found some doco here:

        
http://tit.irk.ru/perlbookshelf/advprog/ch10_02.htm#ch10-pgfId-976240

Here it talks about how to dump out complex data structures and mentions
eval. What I don't understand is how to evaluate a file and access the
result again.

As a work-around, I am currently putting my configuration data into a .pm
file and getting at it by using 'use'. Unfortunately you can't say

        $package = 'foo::configuration';
        use $package;

It's not legal. This means that this way doesn't seem the best. What I need
is something like:

        $file = 'configuration.pl';
        $result = evaluate_file($file);    # FIXME
        foreach $item ($result) {
           # process configuration item
        }

Appreciate your help.

Steve.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to