in reply to Re: Problem with conditional module load
in thread Problem with conditional module load

Thank you so much for the reply. I have looked things over and modified the code to run with the use if pragma:

#BEGIN { # my $LoadModule = ($^O ne 'MSWin32') ? 'UnixSecurity' . '' : ' +Win32Security' . ''; # eval "require $LoadModule; 1;" or die $@ if $LoadModule; # $LoadModule->import(); # #} use if ($^O eq 'MSWin32'), 'Win32Security'; use if ($^O ne 'MSWin32'), 'UnixSecurity';

I am still getting the error and I am not sure why?

C:\Perl> Can't locate in @INC (you may need to install the Win32Security module) (@INC contains: C:/Perl C:/strawberry/perl/site/lib C:/strawberry/perl/ vendor/lib C:/strawberry/perl/lib .) at C:/strawberry/perl/lib/ line 13. BEGIN failed--compilation aborted at C:/Perl/ line 40. Compilation failed in require at C:\Perl\ line 5. BEGIN failed--compilation aborted at C:\Perl\ line 5.

Based on my current understanding, I believe the revised code should work.