diff options
author | https://www.google.com/accounts/o8/id?id=AItOawn9r0IXGAV72TXTUjFfsnSspjh_BFtmni0 <Christine@web> | 2012-04-02 07:26:01 -0400 |
---|---|---|
committer | admin <admin@branchable.com> | 2012-04-02 07:26:01 -0400 |
commit | 45a88ebf9e5c6f2c62e3ad96456c70c358398f9d (patch) | |
tree | 70a8a758034c2631702713bce6dca512a74dc539 /doc/plugins | |
parent | 443389bef9a73d17896fc0aec3931f1c9a2ac382 (diff) | |
download | ikiwiki-45a88ebf9e5c6f2c62e3ad96456c70c358398f9d.tar ikiwiki-45a88ebf9e5c6f2c62e3ad96456c70c358398f9d.tar.gz |
Diffstat (limited to 'doc/plugins')
-rw-r--r-- | doc/plugins/write/tutorial/discussion.mdwn | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/plugins/write/tutorial/discussion.mdwn b/doc/plugins/write/tutorial/discussion.mdwn new file mode 100644 index 000000000..19f7e4084 --- /dev/null +++ b/doc/plugins/write/tutorial/discussion.mdwn @@ -0,0 +1,20 @@ +Thanks for the tutorial! + +But I think you have an error in the fib function! If you really start with + + my $last = 0; + +and your fib function, you'll get this error, as you've produced a never ending recursion: + + Deep recursion on subroutine "IkiWiki::Plugin::fib::fib" at ./fib.pm line 29. + +So the fib function should better look like this, which is its true definition (see [[Wikipedia|http://de.wikipedia.org/wiki/Fibonacci-Folge]], for example): + + sub fib { + my $num=shift; + return 0 if $num == 0; + return 1 if $num == 1; + return fib($num - 1) + fib($num - 2); + } + +Just as a hint for people who run into this error while doing this tutorial. |