John M. Dlugosz has asked for the wisdom of the Perl Monks concerning the following question:

I was using
use Win32::OLE; my $SS= new Win32::OLE:: "SourceSafe";
and after a while needed a symbolic constant, so I reached for Win32::OLE::Const. Nothing happened, and I got errors about barewords and strict. So I figured that Const doesn't get along with strict, not declaring the constants in a way that strict knows about.

So I switched to the ->Load form. Now I get an error, "no such type library".

Well, it turns out that OLE wants the ProgID, and OLE::Const wants a typelib name, which are two different names! I had to load "Microsoft SourceSafe", not "SourceSafe" (or "*SourceSafe" would have worked).

First, it's annoying that I need two different names. The automation stuff used by Win32::OLE accesses information; isn't the constant definitions in there too?

Second, why didn't I get the "not found" error with the direct use form? That's inconsistant with the Load form, and an easy way to have mistakes go unnoticed.

—John