Closed Thread Icon

Preserved Topic: Perl Robot Pages that link to <a href="https://ozoneasylum.com/backlink?for=21219" title="Pages that link to Preserved Topic: Perl Robot" rel="nofollow" >Preserved Topic: Perl Robot\

 
Author Thread
WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 04-02-2002 17:45

http://degraaff.org/checkbot/

I recently downloaded a spider from the above url.

It is suposed to be a simple web spider for checking links on an internal web network.

My main problem is that I am trying to run this on windows 2000.

In the readme it tells me to do the commands:

perl makefile.pl
make
make install

Well, to my surprise (or not) there is no make program...

I am really confused as to how I get this to work. How I can examine the sourse? Where it all goes...

These perl module things confuse me.

cycus
Nervous Wreck (II) Inmate

From:
Insane since: Nov 2000

posted posted 04-02-2002 20:01

I am pretty sure that what you are looking at are make scripts intended to be run/compiled on a unix machine.

"make; make install" is pretty standard for unix programs released as source code, also if you unpacked the files from a *.tar.gz or *.tgz file then it was definatly ment for a unix platform.

i could be wrong
hope this helps
-cycus

[This message has been edited by cycus (edited 04-02-2002).]

silence
Maniac (V) Inmate

From: soon to be "the land down under"
Insane since: Jan 2001

posted posted 04-02-2002 20:08

Usually a makefile is used in unix/linux compile the program.

From the link, it looks like the checkbot.pl file is the main source code and the makefile.pl contains the code to generate the executable.

WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 04-02-2002 20:27

So the file is not really intended to run as a stand alone perl file? It is suposed to be a compiled perl program?

That confuses me. So the overall thing here is that it is not usable on a Win Machine?

THanks for what you have given me.

-mage-

cycus
Nervous Wreck (II) Inmate

From:
Insane since: Nov 2000

posted posted 04-03-2002 00:47

yeah i am pretty sure this isn't going to run on windows for you.

WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 04-03-2002 01:51

Ok, I have been working and reading on this all day.

I got the activestate install of perl on my system now.

I have libwww install (or so I think.)

I used PPM (Perl Package Manager) and I was able to find that I have libwww installed. Now I don't know where it is installed or how all these packages are suposed to work under windows. But I have found a libwww-perl.pkg and libwww-perl.ppd files as well as all the compiled files in a different directory.

However I don't know where all the .pl files are such as www.pl. They are all listed in the .pkg file yet no actual file on my computer.

I use the ppm upgrade command and it says that I have libwww installed.

This all leaves me a bit lost at where to go from here, due to the main problem.

At the libwww-perl page on CPAN I downloaded a testbot.pl file. Code at the end.

I run into problems with the require statements.

Can't locate www.pl in @INC (@INC contains: C:/Perl/lib C:/Perl/site/lib .) at testbot.pl line 23.

The same error shows up all over the place whenever attempting to require a file that is suposed to be a part of the libwww-perl package...

Since I don't know where the files are how am I suposed to include them.

I am really interested in learning this stuff and I have been searching the web high and low, discussion boards and such, but all the information I get on this stuff is way out of my league in understanding. If you could offer any assistance in any way I would really appreciate it.

-mage-

code:
#!/usr/public/bin/perl
# $Id: testbot,v 1.2 1994/08/01 13:31:27 fielding Exp $
#-----------------------------------------------------------------
# This program tests the wwwbot.pl library and is based on the one
# written by Brooks Cutter.
#
# The program starts with the BASE URL equal to the current file directory.
# To change it, enter a URL prefixed with "base=", e.g,
#
# Enter a URL (^D to exit): base=http://www.ics.uci.edu/
#
# The program starts with the User-Agent equal to program name.
# To change it, enter a name prefixed with "ua=", e.g,
#
# Enter a URL (^D to exit): ua=MOMspider/0.20
#
# 20 Jul 1994 (RTF): Initial Version
# 31 Jul 1994 (RTF): Changed interface to wwwbot'allowed
#
#-----------------------------------------------------------------
if ($libloc = $ENV{'LIBWWW_PERL'}) { unshift(@INC, $libloc); }

require "www.pl";
require "wwwurl.pl";
require "wwwbot.pl";
require "dumpvar.pl";

$ua = $0; # Method = program name
$ua =~ s#^.*/([^/]+)$#$1#; # lose the path

&www'set_def_header('http', 'User-Agent', "$ua/0.1");
# Set up User-Agent: header
$pwd = ( $ENV{'PWD'} &#0124; &#0124; $ENV{'cwd'} &#0124; &#0124; '' );

$base = "file://localhost$pwd/"; # Set up initial Base URL

#-----------------------------------------------------------------

if ($#ARGV == 0) { # Quickie, one-line version
$url = &wwwurl'absolute($base, $ARGV[0]);
&test($url);
}
else { # Interactive version
print "Enter a URL (^D to exit): ";
while (<> ) {
chop;
if (/^base=(.*)$/) { $base = $1; next; }
if (/^ua=(.*)$/)
{
$ua = $1;
&www'set_def_header('http', 'User-Agent', $ua);
next;
}
$url = &wwwurl'absolute($base, $_);
&test($url);
}
continue
{
print "===========================================================\n";
print "Enter a URL (^D to exit): ";
}
print "\n";
}
exit(0);

#-----------------------------------------------------------------
sub test
{
local($url) = @_;

$delay = &wwwbot'visitable($url);
print "delay of $delay for $url\n";
if ($delay) { sleep($delay); }
$ok = &wwwbot'allowed($url);
print "$ok: $url\n";
&wwwbot'visited($url);

&dumpvar('wwwbot');
}

1;



sonic_tsunami
Bipolar (III) Inmate

From: some evil place, the evil little atoll
Insane since: Jan 2002

posted posted 04-03-2002 20:49

damn, I want linux.
I compiled and ran an eggdrop on my friend's linux server running linux mandrake...
gotta love that built in tar and gzip compression and compiler.

cycus
Nervous Wreck (II) Inmate

From:
Insane since: Nov 2000

posted posted 04-03-2002 21:37

www.freebsd.org

« BackwardsOnwards »

Show Forum Drop Down Menu