gtk-perl: reworked script down to 'cloneall' function