in reply to automake and perl modules

What exactly do you mean by "put the module in the right place?" Why not just load the appropriate module at runtime?

Module::Starter will generate a Makefile.PL which will generate an appropriate Makefile for a Perl module, which you can hook into and tweak if necessary. But the default behavior is generally sufficient.

Unless you really need a Makefile, Module::Build is a more modern alternative.

Replies are listed 'Best First'.
Re^2: automake and perl modules
by sweetser (Acolyte) on Aug 02, 2006 at 11:40 UTC
    I'll use Module::Build. It looks like I need to make a directory lib/foo/ for a module foo::bar that has the file lib/foo/bar.pm. Then I write a simple Build.PL file like so:
    use Module::Build;
    
    my $build = Module::Build->new
    (
         module_name => 'CLQ::QGraphGnuPlot',
         license  => 'GPL2.0'
    );
    
    $build->create_build_script;
    
    In a Makefile.in used by automake, I include a command to run "perl Build.PL; Build; Built install"

    Thanks,
    doug

      You could also use ExtUtils::MakeMaker couldn't you ? ie, create a directory lib/foo that contains bar.pm, write a standard Makefile.PL, and then in the Makefile.in (used by automake), include a command to run "perl Makefile.PL; make install".

      Mind you, I've nothing against you wanting to use Module::Build ... I'm just curious to know if EU::MM is in some way deficient for the purpose of this exercise.

      Cheers,
      Rob
        I have not used either module, so I cannot make a technical judgement on the issue. Either way I'll have to include a "perl Makefile.PL; make install" in Makefile.in.

        doug