in reply to Re: Import constants as scalar instead of bareword sub
in thread Import constants as scalar instead of bareword sub

Why not portable? Why source filters? I sure it as simple as:
eval q{*O_NONBLOCK = \\}.O_NONBLOCK;
This code work, and work even a little (1-20%) faster than usual scalar! It's portable and can be executed automatically in import() if it see user try to import $O_NONBLOCK instead of O_NONBLOCK.