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

im trying to create my first module, and everything says use h2xs to make it easier, alas

>h2xs - ACXn MyModule

gives me

/usr/local/bin/h2xs: /usr/local/bin/perl: bad interpreter: No such file or directory

what does this suggest exactly? and is their a way to rectify it?

Replies are listed 'Best First'.
Re: using h2xs
by FunkyMonk (Bishop) on Jul 11, 2007 at 16:45 UTC
    It's telling you that your perl isn't located at /usr/local/bin/perl?

    Try changing the first line of /usr/local/bin/h2xs to wherever your perl is. On my system (Debian/Lenny) it reads:

    #!/usr/bin/perl
Re: using h2xs
by toolic (Bishop) on Jul 11, 2007 at 16:49 UTC
    I have never used h2xs, but I suspect there is something wrong with how it is installed on your system. On my Unix system I tried:
    > head `which h2xs` #!/cad/apps/gnu/solaris/bin/perl eval 'exec /cad/apps/gnu/solaris/bin/perl -S $0 ${1+"$@"}' if $running_under_some_shell; =head1 NAME h2xs - convert .h C header files to Perl extensions =head1 SYNOPSIS > which perl /cad/apps/gnu/solaris/bin/perl
    So, on my system, the full path to the perl executable matches that inside the h2xs script. You could try this.
Re: using h2xs
by reyjrar (Hermit) on Jul 11, 2007 at 17:38 UTC
    I'd recommend you think about using Module::Starter instead of h2xs.
    -brad..
Re: using h2xs
by derby (Abbot) on Jul 11, 2007 at 17:34 UTC

    Well that is just weird. Looks like someone did some manual maintenance of /usr/local/bin after perl was installed. Is there any perl type binary in /usr/local/bin? (maybe /usr/local/bin/perl5.8.x or something like that).

    -derby