Forcing my module to be initialized first
dan
dan.hitt at gmail.com
Mon Oct 16 05:16:36 UTC 2023
On Monday, 16 October 2023 at 04:26:32 UTC, Paul Backus wrote:
> On Monday, 16 October 2023 at 03:31:13 UTC, dan wrote:
>> I have some code that i would like executed before anything
>> else is.
>>
>> The code is to set an environment variable which is used by a
>> library. I'm trying to find some way to avoid setting the
>> environment variable on the command line, or in any shell
>> script or initialization file.
>>
>> I think the place to put such code would be in a 'static this'
>> inside a module.
>>
>> So i need some way to force my module to be initialized first,
>> ahead of all others.
>
> You may find this article enlightening:
>
> https://devblogs.microsoft.com/oldnewthing/20050607-00/?p=35413
Hi Paul,
Thanks for the link.
It was funny, and for sure too many cooks spoil the broth.
I don't think that applies here, since i'm just trying to tweak
the initialization order, and i'm the only programmer involved.
Of course, i guess all sinners try to justify their wrongdoing
--- hope i'm not doing that here!!
Thanks for your reply.
:)
dan
More information about the Digitalmars-d-learn
mailing list