develooper Front page | perl.module-authors | Postings from November 2003

Re: How to indicate a dependency in my module

Thread Previous | Thread Next
darren chamberlain
November 10, 2003 12:10
Re: How to indicate a dependency in my module
Message ID:
* Bruno Negrao <qmail at> [2003-11-10 17:10]:
> I?m finishing to write a module, Proc::Daemontools, and it requires that the
> daemontools package be installed on a machine for it to work.
> Where must I indicate that this module have a dependency? I already wrote
> this on the README file. Is there any other place?
> In my test script, I cause the test to fail if it cannot find a process,
> 'svscan', running on the machine. Do you think that this can cause all the
> cpan-testers to fail?

I think the best thing to do in your test would be something like:

  my $have_svscan = 0;

  if (find_svscan()) {
      $have_svscan = 1;
      plan tests => 2;
  else {
      plan tests => 1;

  ok("Some svscan related test") if $have_svscan;

Where find_svscan looks in the Appropriate Places for svscan, and runs
the tests if it can be found.


You know the great thing about TV? If something important happens
anywhere at all in the world, no matter what time of the day or night,
you can always change the channel.
    -- Jim Ignatowski

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About