in reply to Another config file module (any alternative to symbolic refs?)
For your first question:
my( %site, %search ); use SiteConfig ( site=>\%site, search=>\%search );
Update: Rereading your code, I suspect the above may not be enough information. (:
- tye (but my friends call me "Tye")package SiteConfig; use strict; use XML::Simple; sub import { my %toImport= @_; foreach my $key ( keys %toImport ) { %{ $toImport{$key} }= %{ XMLin("./$key.xml") }; } } 1;
|
|---|