I think the authentication image you're referring to is called a "captcha". Authen::Captcha may be useful. There are tons of CPAN modules to do pie charts, like Chart::Pie. None of which I've used myself.
I've had good experiences with PAR; you don't even have to have Perl installed to run a pp-generated executable.