Subject: | Example in documentation is wrong |
The Example is wrong and gives an error:
http://search.cpan.org/~hinnerk/CGI-IDS-1.0116/lib/CGI/
IDS.pm#Helper_methods_for_building_and_improving_whitelists
The foreach contains "$value", but it must be "$entry->{value}", see
below:
# print reasons and key/value pairs to a logfile for analysis of your
application parameters.
print STDERR "filtered_keys:\n";
foreach my $entry (@{$ids->{filtered_keys}}) {
print STDERR "\t".$entry->{reason}."\t".$entry->{key}.' => '.$entry->
{value}."\n";
}
print STDERR "non_filtered_keys:\n";
foreach my $entry (@{$ids->{non_filtered_keys}}) {
print STDERR "\t".$entry->{reason}."\t".$entry->{key}.' => '.$entry->
{value}."\n";
}