in reply to Re^3: global var
in thread global var
use xxx (); #imports all of the symbols in @EXPORT use xxx qw(OpenConnection $LoggedOn_user_id); # imports # all of the symbols in @EXPORT AND subroutine OpenConnection # AND the scalar $LoggedOn_user_id from @EXPORT_OK
Sorry, but those two are incorrect. As per use, use Foo (); is exactly equivalent to BEGIN { require Foo }, so nothing is exported at all. When you say use Foo qw/bar/;, Exporter exports only that, regardless of what's in @EXPORT.
Update: Hm, my posting seems to have overlapped with an update to the node.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: global var
by tultalk (Monk) on Apr 06, 2017 at 21:11 UTC | |
by shmem (Chancellor) on Apr 06, 2017 at 22:14 UTC | |
by pryrt (Abbot) on Apr 06, 2017 at 22:15 UTC |