|
Posted by Sisyphus on June 2, 2006, 10:19 pm
Please log in for more thread options
> Sisyphus wrote:
> > > Sisyphus wrote:
> > > > D:\pscrpt\if>cat try.pl
> > > > use if $^O =~ /another/, MODULE => "Non::Existent";
> > > > print "OK\n";
> > >
> > > You've misread the documentation (which, admittedly, is sparse). You
> > > are supposed to pass the module name as the second argument, and any
> > > arguments you would normally pass to use or import() as the remaining
> > > arguments. So this should be:
> > >
> > > use if $^O =~ /another/, "Non::Existent";
> >
> > Yes, that was my first attempt but it produced the error:
> >
> > Too few arguments to `use if' (some code returning an empty list in list
> > context?) at D:/perl58_M/5.8.8/lib/if.pm line 7.
> > BEGIN failed--compilation aborted at try.pl line 2.
>
> I do feel the need to point out that this error message told you
> exactly what the problem was.
I don't think this is the forum to discuss your needs.
I'm also not so sure that you and I would agree on the meaning of "exactly".
The term "some code" does not strike me as being all that exact.
> I'm confused as to why you chose to
> disregard it and instead change the syntax of your module call
> syntax...
>
I "chose to disregard it" ??
The arrogance of that assertion is, of course, insulting. The fact that it's
false doesn't really bother me.
Cheers,
Rob
|