This is a version of the problem that I described in Re: Eval doesn't see lexicals. (End of file is a block exit and Perl does cleanup.) The simplest solution is to insert the following in EvilEval.pm.
# Fool Perl's reference counting into keeping %serial_of alive
sub do_not_cleanup_serial_of {
%serial_of;
}