The "if" module

The "if" module

am 02.06.2006 02:26:15 von Sisyphus

D:\pscrpt\if>cat try.pl
use if $^O =~ /another/, MODULE => "Non::Existent";
print "OK\n";
D:\pscrpt\if>perl try.pl
Can't locate Non/Existent.pm in @INC (@INC contains: D:/perl58_M/5.8.8/lib
D:/perl58_M/site/5.8.8/lib D:/perl58_M/site/lib .) at
D:/perl58_M/5.8.8/lib/if.pm line 13.
BEGIN failed--compilation aborted at try.pl line 1.

Since $^O does not match "another", I expected there to be no attempt to
load the non-existent module (Non::Existent).

What's the correct usage of the 'if' module for this case where I want to
load Non::Existent iff $^O matches "another" ?

Cheers,
Rob