Subject: | documentation bug in Maypole::Manual::Request |
In the section of Maypole::Manual::Request that deals with Net::Amazon there is a missing curly bracket. See below
--cut--
Solution: Munge the contents of " $r->params " before jumping to the
original "do_edit" routine. For instance, in this method, we use a
Net::Amazon object to fill in some fields of a database row based on an
ISBN:
sub create_from_isbn :Exported {
my ($self, $r) = @_;
my $response = $ua->search(asin => $r->params->{isbn});
my ($prop) = $response->properties;
# Rewrite the CGI parameters with the ones from Amazon
#--problem starts on line below
@{$r->params->{qw(title publisher author year)} =
($prop->title,
$prop->publisher,
(join "/", $prop->authors()),
$prop->year());
# And jump to the usual edit/create routine
$self->do_edit($r);
}
--cut-
there is a missing right curly bracket somewhere between @{$r and $prop-year()) - it's very difficult to tell where. I think that this part of the manual needs to be rewritten using code with much greater clarity and no syntax errors.
Cheers
Kieren