smackdab has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I am creating a module (win32 only) that installs a test.pm and a test.dll. On my machine they are in c:\dev\perl\site\lib\win32\test.*

I got the "make install" to do that, but now I want to use Win32::API to reference test.dll.

Is there an easy way to get this subdirectory?

Do I have to walk @INC or PERL5LIB or ???

thanks

Replies are listed 'Best First'.
Re: refering to a DLL I install
by Kanji (Parson) on Jul 21, 2002 at 05:53 UTC

    If you use or require Win32::test before you need to reference test.dll and assuming the two are in the same directory, you can peek into $INC{'Win32/test.pm'} for a path to work form...

    use Win32::test; (my $dll = $INC{'Win32/test.pm'}) =~ s/pm\z/dll/;

        --k.


      Awesome, THANKS !!!