Gossamer Forum
Home : Products : DBMan : Discussions :

Not a CODE reference

Quote Reply
Not a CODE reference
Hey, all. I'm getting the following error message when running DBman

Error Message : fatal error: Not a CODE reference in sort at /www/sites/nyu.edu/htdocs/education/public_html/cgi-bin/newsite/summer.cgi line 594.

When I view the source, it seems to be running the sub html_page_top with no problem, but then dies once it gets any further. Here is what line 594 (and nearby lines) look like in my cgi file:

# Sort the array @hits in order if we are meant to sort.
if (exists $in{'sb'}) { # Sort hits on $in{'sb'} field.
my ($sort_order, $sort_func);
$in{'so'} ? ($sort_order = $in{'so'}) : ($sort_order = "ascend");
$sort_func = "$db_sort{$db_cols[$in{'sb'}]}_$sort_order";

foreach $hit (sort $sort_func (keys %sortby)) { <<-- Line 594
$first = ($hit * $#db_cols) + $hit; $last = ($hit * $#db_cols) + $#db_cols + $hit;
push (@sortedhits, @hits[$first .. $last]);
@hits = @sortedhits;

I've also gone ahead and posted by html, cfg, and cgi files at the following addresses:


Anyone ever encounter this message before, because I certainly never have. I don't think I've done anything different from other DB's I've set up... Any ideas would be most appreciated. Many thanks in advance!