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.
<%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.