Help w/newbie Perl runtime Error 
Author Message
 Help w/newbie Perl runtime Error

Hi All-

I'm having a problem when running a PERL script I wrote (copied). I get the
following error:


It is pointing to line 8 , which is:

require 'sys/socket.ph';                <---- line 8
require 'sys/errno.ph';
require 'sys/wait.ph';
require 'getopts.pl';

I'm assuming I need some libraries that I managed to not install. I am
running PERL on a SunOS v4.1.4 Sparc 20. Any idea as to where I can get the
missing files, or is my problem something else? What is h2ph? Help

newsgroup.

Thanks,
John Keller



Sat, 18 Dec 1999 03:00:00 GMT  
 Help w/newbie Perl runtime Error

: I'm having a problem when running a PERL script I wrote (copied). I get the
: following error:


But that is not a runtime error.

That is a compilation error...

: It is pointing to line 8 , which is:

: require 'sys/socket.ph';              <---- line 8
: require 'sys/errno.ph';
: require 'sys/wait.ph';
: require 'getopts.pl';

: I'm assuming I need some libraries that I managed to not install. I am

Yep.

Once you figure out how to get the required files (by applying h2ph
to your C code header files), then you can install them where perl
can find them.

To see where perl looks, you can do:


: running PERL on a SunOS v4.1.4 Sparc 20. Any idea as to where I can get the
: missing files,

http://www.perl.org/CPAN/

: or is my problem something else?
: What is h2ph?

I think the discussion in the Perl FAQ answers that.

What part of the discussion there are you unclear on?

: Help

Ask it here, get the answer here.

: or reply to the
: newsgroup.

OK.

--
    Tad McClellan                          SGML Consulting
    Tag And Document Consulting            Perl programming



Sat, 18 Dec 1999 03:00:00 GMT  
 Help w/newbie Perl runtime Error

Quote:


>: I'm having a problem when running a PERL script I wrote (copied). I get the
>: following error:


>But that is not a runtime error.

>That is a compilation error...

According to the Functions section in the second edition of programming
perl while discussing requiring a package, require is "...like use,
exccept that it happens at run-time, not compile time..."

Quote:
>: It is pointing to line 8 , which is:

>: require 'sys/socket.ph';          <---- line 8
>: require 'sys/errno.ph';
>: require 'sys/wait.ph';
>: require 'getopts.pl';

>: I'm assuming I need some libraries that I managed to not install. I am
>: running PERL on a SunOS v4.1.4 Sparc 20. Any idea as to where I can get the
>: missing files,

I have either deleted or missed the reference to which version of perl
you're running,

  perl -v

will tell you, but if you're running perl 5 then it may be worth a few
minutes work to excise those references as perl 5 has some modules which
are usually installed as standard which might help, depending on what's
in
your code.

  use Socket;

probably gets you everything you need which would have come from
sys/socket.ph,

  use POSIX qw/:errno_h :sys_wait_h/;

probably gives you the the bits of errno.h and wait.h which you use.

getopts.pl still comes with the perl distribution, but there are modules
called Getopt::Std and Getopt::Long which may be worth investigation.

If you're not using perl 5 then sorry for wasting your time, it's probably
worth upgrading.

Hope this helps,

Mike

--

http://www.stok.co.uk/~mike/       |   PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/    |                   65 F3 3F 1D 27 22 B7 41



Sun, 19 Dec 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Help w/newbie Perl runtime Error

2. HELP WANTED: runtime error message: VARIABLE ERROR.

3. HELP! Runtime Exception Error

4. Win32::AdminMisc and "error: Runtime Error"

5. Runtime Error in Perl

6. Runtime error in Perl executable

7. perl, tk, ftp runtime error

8. EventLog Gets Runtime Exception Error

9. ExtUtils::MakeMaker runtime error

10. Runtime Error in LanMan EnumShares

11. Error : Runtime exception with Win32::ODBC

12. Error : Runtime exception with win32Api...

 

 
Powered by phpBB® Forum Software