in reply to Re^3: When is "use module" not the same as require+import?
in thread When is "use module" not the same as require+import?
is equivalent toBEGIN { my @fields = qw/field1 field2/; use fields @fields; }
which is compiled and executed as follows:BEGIN { my @fields = qw/field1 field2/; BEGIN { require fields; fields->import(@fields); } }
As you can see, an empty array is passed to the module. I believe you were mistaken when you claimed it worked.
|
|---|