Gossamer Forum
Home : Products : DBMan SQL : Discussion :

verifying URL

Quote Reply
verifying URL
I am currently running DBMan SQL 2.0.3, and am attempting to call a perl function in the search_results template:

<%set broken_link = Dbsql::HTML::check_url(current_URL)%>

I added this funciton to the HTML.pm file:

sub check_url {
# --------------------------------------------------------
# Checks to see if the URL is valid
use LWP::Simple;
$URL = shift;
unless (defined ($content = get $URL)) {
return "0";
}
return "1";
}

When the link is broken, the variable broken_link should be set to 0. This worked fine in the flat-file version of DBMan, but I get the error:

Error: Unable to load module: Dbsql::HTML. Reason:

Compilation failed in require at /www/cgi-bin/admin/GT/Template.pm line 656. ,
Error: No subroutine 'Dbsql::HTML::check_url' in 'Dbsql.pm'

Any help would be appreciated. Thanks.
Subject Author Views Date
Thread verifying URL mrsnyder 3081 Feb 22, 2002, 1:40 PM
Thread Re: [mrsnyder] verifying URL
Paul 3019 Feb 23, 2002, 2:31 AM
Post Re: [RedRum] verifying URL
mrsnyder 2991 Feb 23, 2002, 11:30 AM