in reply to When is "use module" not the same as require+import?
There's another difference which the documentation is silent about, and that's the version of the module:
$ perl -wle 'use CGI 100' CGI version 100 required--this is only version 3.15 at -e line 1. BEGIN failed--compilation aborted at -e line 1. $ perl -wle 'BEGIN { require CGI; CGI->import(100) };' # (no output)
From the documentation there's no obvious way to require a minimal version of a module (expect checking it manually, and die if it's not large enough).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: When is "use module" not the same as require+import?
by ikegami (Patriarch) on Sep 19, 2008 at 19:28 UTC |