in reply to Logic for importing and strict vars?
Subs are special, perl doesn't care so much if a function is declared to allow it to be called, this is valid:
For the code to work you just need to have a function in the *::myFunction slot at execution time. So I guess this is why the second line works?perl -cE "use strict; use warnings; myFunction()" -e syntax OK
Now for the last one, tye's post actually has the answer:
when the variable slot of a glob gets assigned to by code compiled into another packageFor the import to be valid, the glob as to be written from another package.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Logic for importing and strict vars?
by haukex (Archbishop) on Feb 28, 2019 at 08:53 UTC |