> -----Original Message-----
> From: Wu, Gang (Steven) [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 25, 2004 4:51 PM
> To: Williams, Ken; Eric Wilhelm
> Cc: [EMAIL PROTECTED]
> Subject: RE: How do I disable modules in a script
>
>
> Hi, Ken,
>
> It does work, thanks a lot!
>
> By the way, can you explain a little bit about "Inline->import('C')"?
> What does it do? I am rather new to Perl, and some explanation would
> help me a lot understand the approach.
For any arbitrary module, doing
use Foo::Bar @list;
is the same as doing
BEGIN {
require Foo::Bar;
Foo::Bar->import(@list);
}
, so the standard "use Inline 'C';" is equivalent to
BEGIN {
require Inline;
Inline->import('C');
}
. In your case, you just put a little code in between the require() and the
import().
-Ken