Perl module problem


#1

Hi there!

I got a question for experienced DH Perl users (or anyone who knows the answer :slight_smile:

I need to create my own Perl module on DH, so what I did is:

[rootbeer]$ cd ~
[rootbeer]$ h2xs -X -n MyMod
Defaulting to backwards compatibility with perl 5.8.4
If you intend this module to be compatible with earlier perl versions, please
specify a minimum perl version with the -b option.

Writing MyMod/lib/MyMod.pm
Writing MyMod/Makefile.PL
Writing MyMod/README
Writing MyMod/t/MyMod.t
Writing MyMod/Changes
Writing MyMod/MANIFEST

[rootbeer]$ cd MyMod

[rootbeer]$ perl Makefile.PL
Checking if your kit is complete…
Looks good
Writing Makefile for MyMod

[rootbeer]$ make
cp lib/MyMod.pm blib/lib/MyMod.pm
AutoSplitting blib/lib/MyMod.pm (blib/lib/auto/MyMod)
Manifying blib/man3/MyMod.3pm

[rootbeer]$ make test
PERL_DL_NONLAZY=1 /usr/bin/perl “-MExtUtils::Command::MM” “-e” “test_harness(0, ‘blib/lib’, ‘blib/arch’)” t/*.t
t/MyMod…ok
All tests successful.
Files=1, Tests=1, -1 wallclock secs ( 0.03 cusr + 0.00 csys = 0.03 CPU)

[rootbeer]$ make install
mkdir /usr/local/lib/perl: Permission denied at /usr/share/perl/5.8/ExtUtils/Install.pm line 112
make: *** [pure_site_install] Error 255

  • as you can see I got this error ‘Permission denied’, and the line 122 of Install.pm is:
    $packlist->read($tmpfile) if (-f $tmpfile);

All of this works just fine in my own linux box. I understand that since I’m in a hosted environment my rights/priviledges on this machine are limited, but I still need to install my own perl modules for my personal use.

Any ideas?


#2

Here’s an idea: try installing the module in your home directory instead of a system directory.

:cool: [color=#6600CC]Atropos[/color] | openvein.org


#3

Hi Atropos7,

Yes - now it works fine :slight_smile:
Thanks a lot!