in reply to Detecting modules in use?
Look for the module in the %INC associative array. According to the docs for require (and use just calls require in a BEGIN block) every module that gets 'used' gets its name put into this hash, where the key is the file name, and the value is the 'real path' to the file. So the answer is:
Update: Noticing that KM actually gave this answer here, I return the "better-late-then-never" award. Sigh.if( not exists $INC{DBI} ) { require DBI; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE: Detecting modules in use?
by dchetlin (Friar) on Oct 31, 2000 at 02:45 UTC |