在Windows 要裝這個模組:
ppm install http://www.roth.net/perl/packages/win32-api-prototype.ppd
但是公司不行直接這樣安裝,所以下載這個win32-api-prototype.ppd,然後修改如下:
<SOFTPKG NAME="Win32-API-Prototype" VERSION="0,2002,12,17">
<TITLE>
Win32::API::Prototype
</TITLE>
<ABSTRACT>
The Win32::API::Prototype module.
Simplifies using Win32::API by accepting a C function prototype
and exposing the function by name in the main namespace.</ABSTRACT>
<AUTHOR>
Roth Consulting (http://www.roth.net/)
</AUTHOR>
<IMPLEMENTATION>
<!-- Perl Version="5005" -->
<OS NAME="MSWin32" />
<ARCHITECTURE NAME="MSWin32-x86" />
<DEPENDENCY NAME="Win32-API" VERSION="0,0,0,0" />
<CODEBASE HREF="http://www.roth.net/perl/packages/lib/Win32/API/Win32-API-Prototype_AllBuilds.tar.gz" />
</IMPLEMENTATION>
注意這個http://www.roth.net/perl/packages/lib/Win32/API/Win32-API-Prototype_AllBuilds.tar.gz
<IMPLEMENTATION>
<!– Perl Version=”5005_AS” –>
<OS NAME=”MSWin32″ />
<ARCHITECTURE NAME=”MSWin32-x86-object” />
<DEPENDENCY NAME=”Win32-API” VERSION=”0,0,0,0″ />
<CODEBASE HREF=”http://www.roth.net/perl/packages/lib/Win32/API/Win32-API-Prototype_AllBuilds.tar.gz” />
</IMPLEMENTATION>
<IMPLEMENTATION>
<!– Perl Version=”5006″ –>
<OS NAME=”MSWin32″ />
<ARCHITECTURE NAME=”MSWin32-x86-multi-thread” />
<DEPENDENCY NAME=”Win32-API” VERSION=”0,0,0,0″ />
<CODEBASE HREF=”http://www.roth.net/perl/packages/lib/Win32/API/Win32-API-Prototype_AllBuilds.tar.gz” />
</IMPLEMENTATION>
<IMPLEMENTATION>
<!– Perl Version=”5008″ –>
<OS NAME=”MSWin32″ />
<ARCHITECTURE NAME=”MSWin32-x86-multi-thread-5.8″ />
<DEPENDENCY NAME=”Win32-API” VERSION=”0,0,0,0″ />
<CODEBASE HREF=”Win32-API-Prototype_AllBuilds.tar.gz” />
</IMPLEMENTATION>
<IMPLEMENTATION>
<!– Perl Version=”5010″ –>
<OS NAME=”MSWin32″ />
<ARCHITECTURE NAME=”MSWin32-x86-multi-thread-5.10″ />
<DEPENDENCY NAME=”Win32-API” VERSION=”0,0,0,0″ />
<CODEBASE HREF=”Win32-API-Prototype_AllBuilds.tar.gz” />
</IMPLEMENTATION>
</SOFTPKG>
注意到這個ppd會使用到http://www.roth.net/perl/packages/lib/Win32/API/Win32-API-Prototype_AllBuilds.tar.gz,所以我們可以自行下載到跟ppd檔同一個資料夾中,又因為我使用perl 5.10.0所以要新增這一段敘述:
<IMPLEMENTATION>
<!– Perl Version=”5010″ –>
<OS NAME=”MSWin32″ />
<ARCHITECTURE NAME=”MSWin32-x86-multi-thread-5.10″ />
<DEPENDENCY NAME=”Win32-API” VERSION=”0,0,0,0″ />
<CODEBASE HREF=”Win32-API-Prototype_AllBuilds.tar.gz” />
</IMPLEMENTATION>
不然會產生ppm install failed: The PPD does not provide code to install for this platform這樣的錯誤!