Module::Install can't locate required modules

T

Teo

Hi,

I just tried to write my first Makefile.PL as follows:

# Load the Module::Install bundled in ./inc/
use inc::Module::Install;

# Define metadata (we read it from the script)
name 'dprofpp_grapher';
abstract_from 'dprofpp_grapher';
author_from 'dprofpp_grapher';
version_from 'dprofpp_grapher';
license_from 'dprofpp_grapher';

# Specific dependencies
require 'Data::Dumper' => 0;
# other requirements stripped

install_script 'dprofpp_grapher';

auto_install;

WriteAll;

All the required modules are available: I can run

perl -e "use Data::Dumper;"

for all the required modules without any problem.

When I run

perl Makefile.PL

I get

include /Users/corti/svn/nethz/tools/dprofpp_grapher/inc/Module/
Install.pm
include inc/Module/Install/Metadata.pm
include inc/Module/Install/Base.pm
Can't locate Data::Dumper in @INC (@INC contains: inc /sw/lib/
perl5/5.8.6/darwin-thread-multi-2level
/sw/lib/perl5/5.8.6 /sw/lib/perl5 /sw/lib/perl5/darwin
/System/Library/Perl//5.8.6/darwin-thread-multi-2level /System/
Library/Perl//5.8.6
/System/Library/Perl/ /System/Library/Perl/5.8.6//darwin-thread-
multi-2level
/System/Library/Perl/5.8.6/ /System/Library/Perl/5.8.6/darwin-thread-
multi-2level/
/System/Library/Perl/5.8.6/darwin-thread-multi-2level /System/
Library/Perl/5.8.6
/Library/Perl/5.8.6/darwin-thread-multi-2level /Library/Perl/5.8.6 /
Library/Perl
/Network/Library/Perl/5.8.6/darwin-thread-multi-2level /Network/
Library/Perl/5.8.6 /Network/Library/Perl
/System/Library/Perl/Extras/5.8.6/darwin-thread-multi-2level /System/
Library/Perl/Extras/5.8.6
/Library/Perl/5.8.1/darwin-thread-multi-2level /Library/Perl/
5.8.1 .) at Makefile.PL line 16.

How can I make Modules::Install find the same modules as the perl
executable?

Many thanks for any hint.

Matteo
 
T

Teo

Hi again,

Hi,

I just tried to write my first Makefile.PL as follows:

# Load the Module::Install bundled in ./inc/
use inc::Module::Install;

# Define metadata (we read it from the script)
name 'dprofpp_grapher';
abstract_from 'dprofpp_grapher';
author_from 'dprofpp_grapher';
version_from 'dprofpp_grapher';
license_from 'dprofpp_grapher';

# Specific dependencies
require 'Data::Dumper' => 0;
# other requirements stripped

Sometimes a night of sleep and a couple of coffees can help: reading
the perlfunc man page about require and removing the quotes works like
a charm ...

Matteo
 
B

Ben Morrow

Quoth Teo said:
I just tried to write my first Makefile.PL as follows:

# Load the Module::Install bundled in ./inc/
use inc::Module::Install;

# Define metadata (we read it from the script)
name 'dprofpp_grapher';

If your script does anything significant (which I assume it does), it
may well be better to extract the functionality out into a module (say,
App::DProfPPGrapher, or perhaps Devel::DProf::Graph) and have a
relatively trivial script that just calls into the module.
abstract_from 'dprofpp_grapher';
author_from 'dprofpp_grapher';
version_from 'dprofpp_grapher';
license_from 'dprofpp_grapher';

This can be simplified to

all_from 'dprofpp_grapher';

which will also attempt to extract a minimum Perl version from any

use 5.006;

or such you have.
# Specific dependencies
require 'Data::Dumper' => 0;

'require' is not a M::I command, it is a Perl command. I suspect you
meant 'requires'.

Ben
 
T

Teo

Dear Ben,

If your script does anything significant (which I assume it does), it
may well be better to extract the functionality out into a module (say,
App::DProfPPGrapher, or perhaps Devel::DProf::Graph) and have a
relatively trivial script that just calls into the module.


This can be simplified to

all_from 'dprofpp_grapher';

which will also attempt to extract a minimum Perl version from any

use 5.006;

or such you have.
Thanks


'require' is not a M::I command, it is a Perl command. I suspect you
meant 'requires'.

I just figured it out (a couple of cups of coffee can be of great
help :)

Many thanks,

Matteo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top