Re: configuration and namespaces
Derek Robert Price <[email protected]> Tue, 24 Jun 2003 10:45:55 -0400
| Newsgroups | gmane.comp.tex.texi2html.devel |
|---|---|
| Organization | Ximbiot <http://ximbiot.com> |
| Message-ID | <[email protected]> |
Dumas Patrice wrote:
>>I think I prefer the Texi2html::Config namespace, since it simplifies
>>the Config.pm file, but this requires that warnings be suppressed during
>>the require since, if defaults are provided for everything, then a
>>redefinition warning will be issued for at least the functions. strict
>>
>>
>
>This issue is allready handled, with things like
>
>$t2h_print_thing = \&t2h_default_print_thing;
>
>sub t2h_default_print_thing($)
>{
>...
>}
>
>When redefining subroutines the user can give them any name he wants.
>I believe it would also work if we used anonymous subroutines in the
>way you suggested.
>
I was thinking along the lines of allowing the actual function
definition to be set in the config file, but subroutine references are
fine, and should work as you say.
>>compilation may need to be suppressed for the duration of the require as
>>well.
>>
>>
>
>If I'm not wrong, my experiments seem to show that this happens allready,
>as when a new file is required, the strict is suppressed.
>
>
You are correct. I don't know why I remembered differently. Maybe it
was a bug in old versions of Perl because I remember it causing me some
grief some years ago.
Derek
--
*8^)
Email: [email protected]
Get CVS support at <http://ximbiot.com>!
--
I will not conduct my own fire drills.
I will not conduct my own fire drills.
I will not conduct my own fire drills...
- Bart Simpson on chalkboard, _The Simpsons_