I mentioned this yesterday and here it is. It is exceedingly simple.
It sets up a fake OpenGL namespace and blocks the %INC entry so it won't be overloaded by the real OpenGL.pm. Then it installs a barebones import method that simply rewrites it into an import on OpenGL::Modern, executed in the namespace of the caller. That way any import calls to the OpenGL namespace result in the import being done from OpenGL::Modern into the caller.
Only niggle is that OpenGL::Modern has no :constants, so i had to munge that into :all.
I mentioned this yesterday and here it is. It is exceedingly simple.
It sets up a fake OpenGL namespace and blocks the %INC entry so it won't be overloaded by the real OpenGL.pm. Then it installs a barebones import method that simply rewrites it into an import on OpenGL::Modern, executed in the namespace of the caller. That way any import calls to the OpenGL namespace result in the import being done from OpenGL::Modern into the caller.
Only niggle is that OpenGL::Modern has no :constants, so i had to munge that into :all.
What do you think?