in reply to Re^2: What does "-" in a use statement do?
in thread What does "-" in a use statement do?
Nowhere in use does it say that the LIST should be a list of identifiers.
If you read the documentation of App::Cmd::Setup, I presume that there it will also not talk about a list of identifiers that get exported, especially no identifier named -app.
If you further read use (and the associated require) you will find that one of the things that use does is call a subroutine import if it exists. And that subroutine is called with all the parameters from the LIST part of the use statement.
What that import subroutine does depends on the module. If the module uses the import subroutine from Exporter like the following:
use Exporter 'import';
... then it will get the behaviour you seem to expect, of exporting subroutine names and variable names on demand.
But most likely, App::Cmd::Setup does something different.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: What does "-" in a use statement do?
by nysus (Parson) on Jan 27, 2018 at 14:25 UTC | |
|
Re^4: What does "-" in a use statement do?
by nysus (Parson) on Jan 27, 2018 at 14:41 UTC | |
by AnomalousMonk (Archbishop) on Jan 27, 2018 at 16:36 UTC | |
by Your Mother (Archbishop) on Jan 29, 2018 at 19:15 UTC |