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

Greetings,

I've being trying to creating a PPD with PPM 4, but this tool looks crazy.

Here is the content of the PPD file:

<SOFTPKG NAME="DTS" VERSION="0,01,0,0">
  <TITLE>DTS</TITLE>
  <ABSTRACT>Perl classes to access Microsoft SQL Server 2000 DTS Packages </ABSTRACT>
  <AUTHOR>Alceu Rodrigues de Freitas Junior <glasswalk3r@yahoo.com.br></AUTHOR>
  <IMPLEMENTATION>
      <DEPENDENCY NAME="Carp" VERSION="1,04,0,0" />
      <DEPENDENCY NAME="Class-Accessor" VERSION="0,27,0,0" />
      <DEPENDENCY NAME="Hash-Util" VERSION="0,05,0,0" />
      <DEPENDENCY NAME="Win32-OLE" VERSION="0,1704,0,0" />
      <OS NAME="MSWin32" />
      <ARCHITECTURE NAME="MSWin32-x86-multi-thread-5.8" />
      <CODEBASE HREF="MSWin32-x86-multi-thread-5.8/DTS.tar.gz" />
  </IMPLEMENTATION>
</SOFTPKG>
This file was created automatically by executing nmake ppd after creating the makefile with the regular processes. After creating the tarball as described in the ActivePerl documentation, I received the following error when I try to install the PPD:
ppm install failed: Can't find any package that provide Hash-Util for DTS

The ppm utility cannot find the module Hash::Util, doesn't matter which method I use to search. If I check the perldoc, the Hash::Util module is there. Even if I install the module using nmake install, everything works fine.

I double checked looking at ppm area sync, but it didn't help. I listed all packages in both package areas (perl and site) and Hash::Util is not listed. But if I go the the directory on perl area, the module is there!

Is this a bug, or the Hash::Util module has any other name as a PPD, which I don't have the slightest idea how to guess? I supposed Hash::Util was provided by the regular ActivePerl installation, since I it was available by default after installing version 5.8.8.

Thanks all,

Alceu Rodrigues de Freitas Junior
---------------------------------
"You have enemies? Good. That means you've stood up for something, sometime in your life." - Sir Winston Churchill

Replies are listed 'Best First'.
Re: Cannot find dependencies when creating packages on ActivePerl with PPM 4
by bingos (Vicar) on Jan 22, 2007 at 14:19 UTC

    Yeah, Hash::Util is a core module, since 5.8, this might explain ppm's behaviour. Try removing that dependency from the PPD file.

    A much better way of creating ppm packages that I discovered over the weekend is PPM::Make, you might want to give that a try.

      Thanks for the reply. I tried your tip about removing the dependency from the PPD, and it worked, although there are some drawnbacks, for sure.

      Despite being a core module, I really would like to use the module version number for checking. That would help avoid some trouble when trying to use the module I create with old versions of Hash::Util.

      Besides that, I had to remove the dependencies for Win32::OLE and Carp modules also until I receive no error message.

      Since the PPD file is created based on the Makefile.pl I wrote, it's quite strange PPM cannot search the core modules as well.

      I didn't have a chance to test PPM::Make, do you think this module is capable to solve those issues by itself?


      Alceu Rodrigues de Freitas Junior
      ---------------------------------
      "You have enemies? Good. That means you've stood up for something, sometime in your life." - Sir Winston Churchill
        PPM::Make can help with this issue; it searches (via a remote SOAP server) for package names corresponding to module prerequisites, and if the package name is not found, or if it happens to be perl itself (which is the case for Hash::Util and Carp), it won't be listed as a DEPENDENCY in the ppd file. Furthermore, if the package is included in the additional non-core list of packages that the latest Win32 ActivePerl distribution provides (see the %ap_core hash of PPM::Make::Util for a list), this also won't be added as a DEPENDENCY - this is the case for Win32::OLE, which is provided by the libwin32 package, which is part of the Win32 ActivePerl distribution.
Re: Cannot find dependencies when creating packages on ActivePerl with PPM 4
by izut (Chaplain) on Jan 22, 2007 at 15:15 UTC
    Hi Alceu, Actually it is OT from the OP, but sometime you'll get yourself in trouble with
    <AUTHOR> Alceu Rodrigues de Freitas Junior <glasswalk3r@yahoo.com.br> </AUTHOR>
    Maybe you want to encapsulate it with CDATA or something, to avoid future issues :) Keep up the good work!

    Igor 'izut' Sutton
    your code, your rules.

      Gee... now I'm getting borred: nmake ppd just does not work correctly. You're correct, if this XML is tested against a XML validator it will not pass.

      I think I'll stick around with the old and good tarball. Do you know if the PPD/XML is parsed by the ActivePerl repository server? I didn't notice any issue when using this PPD locally.

      Alceu Rodrigues de Freitas Junior
      ---------------------------------
      "You have enemies? Good. That means you've stood up for something, sometime in your life." - Sir Winston Churchill
        The ActivePerl repository doesn't recognize any ppm packages external to it. A ppm client can add external repositories, which generally are local or remote locations containing ppd files, or summary files of such ppd files if there's many of them. It would be a good idea for this if the ppd file is valid xml, as such files are parsed with an xml parser.
        nmake ppd just does not work correctly
        Upgrade ExtUtils::MakeMaker, then it might.
      Using
      <AUTHOR> Alceu Rodrigues de Freitas Junior &lt;glasswalk3r@yahoo.com.br&gt; </AUTHOR>
      would also work.