Including external code

Require then access

% perl -e 'use Data::Dumper; my %configs=(); require "/home/gnerd/.vds_conf"; print Dumper(\%configs)' 
$VAR1 = {
          'HASH(0xa98d2a0)' => undef
        };

Now lets change the my to our - in essense my is file scoped at best.

% perl -e 'use Data::Dumper; our %configs=(); require "/home/gnerd/.vds_conf"; print Dumper(\%configs)' 
$VAR1 = {
          'plugins' => {
                         'pingall' => {
                                        'file' => 'pingall.html',
                                        'url' => undef,
                                        'port' => 8080 
                                      }
                       }
        };

Published on in