If on the cPanel you are getting the error as follows

Template::Stash::XS object version 2.24 does not match bootstrap parameter  at /usr/lib/perl5/5.8.8/i386-linux-thread-multi/DynaLoader.pm line 253. 

while trying to check & rebuild perl on the server it fails with the error

BEGIN failed–compilation aborted at /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/Template/Stash/XS.pm line 31.
Compilation failed in require at /usr/local/cpanel/Cpanel/Template.pm line 49.
BEGIN failed–compilation aborted at /usr/local/cpanel/Cpanel/Template.pm line 49.
Compilation failed in require at /usr/local/cpanel/Cpanel/AdvConfig.pm line 9.
BEGIN failed–compilation aborted at /usr/local/cpanel/Cpanel/AdvConfig.pm line 9.
Compilation failed in require at /usr/local/cpanel/Cpanel/PostgresUtils.pm line 16.
BEGIN failed–compilation aborted at /usr/local/cpanel/Cpanel/PostgresUtils.pm line 16.
Compilation failed in require at /scripts/pkgacct line 54.
BEGIN failed–compilation aborted at /scripts/pkgacct line 54.

The error occurred  due to the installed version of Perl does not meet the requirements for a required module or library. So you  you use these steps to overcome it

mv /usr/bin/perl /usr/bin/perl-org

ln -s /usr/local/bin/perl /usr/bin/perl

/scripts/checkperlmodules