in reply to Runtime module use and sub definitions

Well, not too much more elegant but you could use autouse

#!/usr/bin/perl # # Bad code - will not work # use strict; use warnings; if ($^O eq 'MSWin32') { use autouse 'MyMod_W32' => qw( bar ); } else { use autouse 'MyMod' => qw( bar ); } bar();

update: Well that's what happens when you post untested code! This will not work. Duh. The 'use' happens at compile time. The last bar defined is the first one used.

-derby