in reply to Pong in SDL
I've not used SDL, and you don't provide enough context for me to be sure. But looking at just the bit of code you presented, I'd guess one of:
I then took a look at the cpan page for SDL and noticed the link to the book. A quick search for add_show_handler finds that exact bit of code (sans comments) on page 52. I thought you were using the '>' to indicate the location of the syntax error, but in fact the book shows a '>' symbol there. I expect that's a syntax error right there.
Looking around in the text, I'm thinking they made a transposition error and it should be:
$app->add_show_handler(
Where the '>' at the end of the line should be moved left. If so, then they've made the same mistake on page 56 (and possibly elsewhere).
Update: Tweaked the first line to make it read better.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Pong in SDL
by choroba (Cardinal) on Nov 30, 2017 at 22:41 UTC | |
|
Re^2: Pong in SDL
by drose2211 (Sexton) on Dec 01, 2017 at 00:01 UTC |