Re: making user definable variables really global
Dumas Patrice <[email protected]> Wed, 18 Jun 2003 11:28:04 +0200
| Newsgroups | gmane.comp.tex.texi2html.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi,
> texi2html.pl:
> ===========================================================
> use Texi2HTML::Config;
>
> # find the files to require with --init_file
> ....
> # pass them to Texi2HTML::Config:
>
> Texi2HTML::Config::load_files(@init_files);
> ===========================================================
>
>
> Texi2html/Config.pm (or in the texi2html.pl file itself)
> ===========================================================
> package Texi2HTML::Config
>
>
> sub load_files
> {
> foreach my $file (@_)
> {
> evel {require $file;}
> }
> }
I have tested and this works nicely. All the variables in the files loaded
by the require are put in the calling package namespace
(i.e. Texi2HTML::Config).
Pat