lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Mon, 21 Nov 2011 19:21:49 +0100
Patrick Rapin <toupie300@gmail.com> wrote:

> It seems interesting. I do not need to generate captchas right now,
> but maybe in the future.
> I have two small remarks after having looked at the project:

> - All your examples in the Introduction wiki page begin with "require
> 'gd' ". It seems useless.

you need to load the gd module at least once, of course not every time
you call captcha.new() . i only addded it into the wiki for easy copy
and paste.

> - You always use string.len() for retrieving the length of the string.
> Why not use the # operator ?

true, is there an advantage ( apart from looking nicer) ? i remember
that there was some pitfall in using # , but i don't remember right now,
ill give it a go. ( the thing i remember might be related to unicode
strings )

startx