Subject: | Bug |
Date: | Tue, 6 Nov 2007 14:50:20 -0700 (MST) |
To: | bug-WWW-CheckSite [...] rt.cpan.org |
From: | josh [...] knowmad.com |
Distribution name and version: WWW-CheckSite-0.018
Perl version: v5.8.8
Operating System vendor and version: linux redhat
Here is checksite.pl
use lib qw(/var/www/vhosts/babypips.com/scripts);
use WWW::CheckSite;
use BP_Mech;
use Data::Dumper;
use strict;
my $website = 'http://dev.babypips.com';
my $wcs = WWW::CheckSite->new(
uri => $website,
prefix => 'babypips',
dir => '/var/www/vhosts/babypips.com/public_html/w3c_test/',
save => 1,
validate => 'by_uri',
v => 2,
ua_class => 'BP_Mech'
);
#print Dumper($wcs);
print "Checking $website for validity\n";
$wcs->validate;
print "Writing Report\n";
$wcs->write_report;
print "Done.\n";
------------------------------------
Here is BP_Mech.pm
package BP_Mech;
use base 'WWW::Mechanize';
sub get_basic_credentials { ( 'babypips', 'forexpips' ) }
1;
----------------------------------
Here is the error.
Cannot initialise a UserAgent:
Can't locate URI/javascript.pm in @INC (@INC contains:
/babypips.com/scripts /us.8
/usr/local/lib/perl5/site_perl/5.8.8/i686-linux
/usr/local/lib/perl5/site_perl/5.8.8 /usr/lo
at /usr/local/lib/perl5/site_perl/5.8.8/WWW/CheckSite.pm line 192
-----------------------------------
And i also had to add..
validate => 'by_uri',
v => 2,
It failed to run the script if i didn't have these things in there.
Any suggestions or help?