Subject: | Documentation bugs |
Three documentation bugs here.
1. Missing enclosing brackets around the $self->authorize($r) should be ($self->authorize($r)) . There may be further examples of this, but I'm not sure.
sub authenticate {
my ($self, $r) = @_;
...
if $self->authorize($r) {
# snip ...
}
2. The next one is in the SQL for the table user the UID field appears to be redundant. It isn't referred to anywhere else in the module code or documentation.
CREATE TABLE users (
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(100) NOT NULL,
UID VARCHAR(20) NOT NULL,
password VARCHAR(20) NOT NULL,
PRIMARY KEY (id),
UNIQUE (UID),
) TYPE=InnoDB;
3. The commas at the end of each table definition before the end of the parentheses cause the sql statement to fail in Mysql (although you don't tell us what database you tested the statements in in the documentation ...). Perhaps you are not using mysql. Also the TYPE=InnoDB statements will cause the table definition to fail in some installations of mysql and does not add to the clarity of the documentation by their inclusion.
Many apologies for my pedantry.
Kieren