Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Trying to use old source code

by Radude (Initiate)
on Jul 23, 2018 at 12:55 UTC ( [id://1219087]=perlquestion: print w/replies, xml ) Need Help??

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

Newbie here. I got my hands on some old source code I'd like to use and judging from my research it may be too old to just use. I may have to rewrite everything. Am I correct in thinking this? Here's the beginning of the code...

#!/usr/bin/perl require 5.005; BEGIN { $| = 1; } use strict; use bytes; #open (EL, '>>rocklog.txt') || die "Can't open rocklog.txt: $!\n"; sel +ect(EL); $|=1; require('r2inter.pl'); use webinter; use IO::Socket; use IO::Select; use Data::Dumper; use Benchmark;

Replies are listed 'Best First'.
Re: Trying to use old source code
by Corion (Patriarch) on Jul 23, 2018 at 12:59 UTC

    Why do you think that the code might be too old to just use?

    Do you encounter errors?

    How do you run the code?

Re: Trying to use old source code
by LanX (Saint) on Jul 23, 2018 at 13:04 UTC
    > judging from my research it may be too old to just use

    Which research? You are talking in riddles.

    Perl development is very backwards compatible, though you might need to install missing modules.

    require('r2inter.pl'); use webinter;

    are not on CPAN so I suppose you have even more old code to maintain.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

Re: Trying to use old source code
by haukex (Archbishop) on Jul 23, 2018 at 13:11 UTC
Re: Trying to use old source code
by Radude (Initiate) on Jul 23, 2018 at 14:26 UTC

    sorry for being too vague guys. I will make sure my next post is up to par or not at all. Thanks for your help!

Re: Trying to use old source code
by Radude (Initiate) on Jul 23, 2018 at 13:39 UTC

    yes this is from the same person that posted on stack overflow. I'm encountering more than a handful of errors. Almost seems some of the things in there aren't supported anymore. Like webinter for instance and the @@'s. I apologize for speaking in riddles. It wasn't my intention. I'm trying to wrap my head around the terminology as fast as I can. I tried running rockerv2.pl through perl as stated in win32how.txt in the doc section. Here's a link to the initial script I'm having problems with. https://sourceforge.net/p/rockserv/code/HEAD/tree/trunk/rockserv2/src/rockserv2.pl

      Quite unsurprisingly, webinter.pm is distributed with the rest of rockserv2.pl, in the Source Forge directory.

      Maybe you can show us how you run the program, and what your file layout is, and maybe show us the exact error messages instead of paraphrasing what you think you are seeing? Then we can give you more concrete advice than just guessing at your environment and what problems you might encounter.

      Radude:

      Have you looked at doc/quickndirty-setup.txt? I've downloaded the code to peruse through it, and it looks like it's supposed to be the docs to help get you up and running. I've not tried installing it or anything, but if you follow that and then post any difficulties, we might be able to lend a hand.

      ...roboticus

      When your only tool is a hammer, all problems look like your thumb.

      what error messages and what OS?
Re: Trying to use old source code
by Radude (Initiate) on Jul 23, 2018 at 13:11 UTC

    It seems to me that in order to run this I would have to run perl 5.005 on an older system

      No.

      The use statement (as documented), specifies the minimum Perl version needed, see the use VERSION section of use.

      Maybe you could tell us what exact problems you encounter when running the code, as basically every version of Perl released within the last 15 years should be able to run this code, provided the required modules and other files are in place.

      I would have to run perl 5.005

      A use VERSION; statement just specifies the minimum Perl version needed. There have been some changes that aren't backwards compatible (usually with deprecation cycles), but to know if you're encountering any of those, you'd have to tell us exactly what problems you're having. Also, note that even old versions of Perl are available via perlbrew. Update: For some general advice on moving from an older to a newer Perl, see e.g. [SOLVED]:Upgrading Perl 5.8 program to 5.22.

      ... because???

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1219087]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (6)
As of 2024-03-29 09:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found