note
mascip
<p>
The author's response (i tried it and it works, with sub IMPORT) :
</p>
<p>
This is not a bug in the module.<br>
The problem is that you specified:<br>
<code>
sub subr :Export(:DEFAULT) { return "subr() was called\n"; }
</code>
:DEFAULT exports are only exported when the module is use'd with no arguments at all. <br>
But then you call:
<code>
use Mod3 'argument';
</code>
with an argument, so the :DEFAULT exports don't happen.
</p>
<p>
You could fix this by specifying:<br>
<code>
sub subr :Export(:MANDATORY) { return "subr() was called\n"; }
</code>
(assuming you always want subr() exported). <br>
If not, then you need to specifically request subr(), like this:
<code>
use Mod3 '&subr', 'argument';
</code>
or request all the defaults, like this:
<code>
use Mod3 ':DEFAULT', 'argument';
</code>
</p>
992581
992609