[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
help re:[ic] TIPS AND TRICKS: Tree example
Some of the code from the example does not seem to work:
store /cgi-bin/store/tree_build.html Safe: Can't call method "set_slice" on
an undefined value at (eval 698) line 39.
30 my $db = $Db{menu_tree};
31 $db->query('delete from menu_tree');
32 my @flds = qw/parent_fld child_fld name category/;
33 my $count++;
34 for(@levels) {
35 my $hash = $_;
36 for(sort keys %$hash) {
37 my $rec = $hash->{$_};
38 my $code = shift @$rec;
39 $db->set_slice($code, \@flds, $rec);
40 $count++;
41 }
42 }
43 return $count;