http://www.perlmonks.org?node_id=991465


in reply to Re^2: dynamic loading modules
in thread dynamic loading modules

Unless I'm misunderstanding your goal, I don't see any reason why you can't use Module::Load or Module::Load::Conditional or a combination of both. Here's a simple test script which works for me.
#!/usr/bin/perl use strict; use warnings; use Module::Load; my $os = 'Yet Unknown'; if ( $^O =~ /MSWin/ ) { load 'Win32'; $os = Win32::GetOSName(); } print $os;
Output of my test: D:\perl>test.pl
Win7