Click here to get back home

The 'if' module

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
The 'if' module Sisyphus 06-01-2006
Posted by Sisyphus on June 1, 2006, 8:26 pm
Please log in for more thread options


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




Similar ThreadsPosted
Lower case module name for non-pragma module January 4, 2005, 10:19 am
RFC: New module 'Module::Bundled::Files' August 26, 2005, 3:49 pm
help with an MD5.pm module!! September 3, 2005, 11:39 pm
Looking for RTP module December 9, 2004, 9:17 pm
module for FFT May 9, 2005, 3:06 pm
Module may not be right one? April 27, 2006, 12:57 pm
The 'if' module June 1, 2006, 8:18 pm
use module March 3, 2007, 5:13 am
Name my Module! July 27, 2007, 6:46 pm
Yet another TL1 module August 7, 2007, 4:12 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap