It's been possible to use various scripting languages to automate GIMP for a long time. But until recently Perl bindings for GIMP were considerably out of date due to lack of interest from contributors. Fortunately, a while ago Ed J started working on updating those, and now a release candidate is available for testing.
Gimp-Perl version 2.30_05 is on CPAN now. It supports GIMP 2.8 and provides the following features:
The way to install the release candidate on Linux is:
perl -MCPAN -e "install 'ETJ/Gimp-2.30_05.tar.gz'"
If you encounter any bugs, please report them on bugzilla.gnome.org.
Heads-up if you are still accessing the downloads via ftp.gimp.org:
The downloads server has been renamed to download.gimp.org, and it doesn't support FTP anymore. If you have linked any file, installer package, source archive or directory with an ftp://-Link, please change it to http://. The directory structure is unchanged.