Thank you so much for the reply. I have looked things over and modified the code to run with the use if pragma:
# my $LoadModule = ($^O ne 'MSWin32') ? 'UnixSecurity' . '..pm' : '
+Win32Security' . '..pm';
# eval "require $LoadModule; 1;" or die $@ if $LoadModule;
use if ($^O eq 'MSWin32'), 'Win32Security';
use if ($^O ne 'MSWin32'), 'UnixSecurity';
I am still getting the error and I am not sure why?
Can't locate Win32Security.pm 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/if.pm line 13.
BEGIN failed--compilation aborted at C:/Perl/SecurityV1.pm line 40.
Compilation failed in require at C:\Perl\TestLoad.pl line 5.
BEGIN failed--compilation aborted at C:\Perl\TestLoad.pl line 5.
Based on my current understanding, I believe the revised code should work.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||