Skip Menu |

This queue is for tickets about the Import-Into CPAN distribution.

Report information
The Basics
Id: 124313
Status: rejected
Priority: 0/
Queue: Import-Into

People
Owner: Nobody in particular
Requestors: SLOYD [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.002005
Fixed in: (no value)



Subject: Support "use Module ();" ?
Now it always calls import(), but sometimes I have the need to inject something like "use Module ();" into the target package.
On Sat Feb 03 11:18:06 2018, SLOYD wrote: Show quoted text
> Now it always calls import(), but sometimes I have the need to inject > something like "use Module ();" into the target package.
‘use Module()’ has no effect on the surrounding scope. (If it does, that’s a bug in the module; the module’s not well-behaved.) All ‘use Module()’ does is: BEGIN { require Module; } If you want that effect at run time, you can just use ‘require Module’.
On Sat Feb 03 11:18:06 2018, SLOYD wrote: Show quoted text
> Now it always calls import(), but sometimes I have the need to inject > something like "use Module ();" into the target package.
The only thing that does is load the module. If all you need to do is load the module, you should be using Module::Runtime, not Import::Into.