in reply to Configuring virtual hosts dynamically with mod_perl

It's been a while since I've mucked with mod_perl, but I want to say that the magic variables like %VirtualHost and @Alias only work within <Perl> sections, not code read in with a PerlRequire directive or the like.

If you want to keep the configuration segregated from the rest of your httpd.conf you probably could stick the <Perl> section into another file (say perl_vhost.conf) and then use the Apache Include directive to read in that other conf file.

You might also check the mod_perl mailing list archives and/or run this question by them.